The Melrose Labs Cards service enables the creation, hosting, communication and management of cards with visual and audio content, and actions. Cards are used by businesses and other organisations to communicate effectively with staff, customers or anyone.
Create a card using a card template and then include the resulting Cards service short URL for your card when you distribute via email, text, chat or QR code. The Cards service hosts your created card for access using an application or viewing directly on a user's mobile device, tablet or computer. Cards supports Adaptive Cards and other card technologies.
Events relating to cards, such as opening and CTA use, can be notified to your application using the service API and webhooks, or viewed in the analytics portal.
Creating a Card
A card is the combination of a card template and the data, or information, that will fill the template fields. To create a card, you select the template and specify the data for the fields in the template.
Cards can be created using the Cards REST API or by clicking on the "create card" button for a card template. Alternatively, the easy to use upcoming card designer will allow you to drag-and-drop your content into a card template or even create your own templates.
Example: If you want to create a card for a property that is being let, you could use the Property Letting template (#10) from the available card templates. This template has fields for the property name, image URL, property summary, details webpage and booking URL. When creating a card using this template, you would provide what you want to have in each of these fields. The Cards service would then return a short URL (e.g. https://richmsg.io/sg4 ) for the created card that will then be hosted by the service, and you can distribute this short URL in a text message via an SMS gateway, or as you require.
Dynamic Cards
Instead of providing the static data to populate a card template at the time of card creation, you can provide a data URL for the data that will fill the card. Whenever the card is accessed using the short URL, the Cards service will retrieve the data from the data URL provided when the card was created.
Use cards to convey rich content such as tickets, alerts, reminders, promotions, vouchers, receipts, confirmations and tasks to your customers and staff.
Card Templates
The following card templates can be used when creating your own Cards using the API or portal. Cards supports Adaptive Cards and other card technologies.
10
[10.1]
Property lettings card used to promote a property.
propertynameProperty name
Name of the property being let.
urlimageImage URL
URL of the image to be displayed on the card. Image should be under 2MB.
propertysummaryProperty summary
A brief description of the property.
urldetailsDetails URL
URL of web page with more details on the property.
urlbooknowBooking URL
URL of web page where property can be booked.
Example
{
"propertyname": "Santorini Escape",
"urlimage": "https://richmsg.io/media/images/seaview-apartments.png",
"propertysummary": "A luxurious two-bedroom apartment with the best views over Santorini.",
"urldetails": "https://melroselabs.com/services/rich-messaging/",
"urlbooknow": "https://melroselabs.com/services/rich-messaging/"
}11
[11.1]
Property for sale card.
statusProperty status
Status of the property sale (e.g. FOR SALE).
propertynameProperty name
Name of the property being sold.
urlimageImage URL
URL of image of the property.
priceSale price
Sale price of property
propertysummaryProperty summary
A brief description of the property.
propertydescriptionProperty description
A long description of the property.
urldetailsDetails URL
URL of web page with more details on the property.
urlarrangeviewingBooking URL
URL of web page where property viewing can be arranged.
Example
{
"status": "FOR SALE",
"urlimage": "https://richmsg.io/media/images/propertyforsale.jpeg",
"urlarrangeviewing": "https://abc.com",
"urldetails": "https://abc.com",
"propertyname": "Caldergrove Gardens, EH11",
"price": "\u00a3292,000",
"propertysummary": "3 bedrooms. New development.",
"propertydescription": "Caldergrove Gardens is an innovative and stylish development of 55, 3, 4 & 5 bedroom detached homes, offering seven contemporary house styles. Show home open Thursday - Monday."
}12
[12.1]
Promotion for use in retail by consumer.
urllogoLogo URL
URL of the logo to be displayed on the card. Image should be under 2MB.
promotitlePromotion title
Title of the promotion.
subtitleSubtitle
Subtitle of the promotion.
urlimageImage URL
URL of the image to be displayed on the card. Image should be under 2MB.
detailsDetails of promotion
A brief description of the promotion.
actiontextAction text
Text on button that user clicks to order, book or find out more.
urlactionAction URL
URL of web page where user can order, book or find out more.
additionaltextAdditional text
Any additional details regarding the promotion.
Example
{
"urllogo": "https://richmsg.io/media/images/pizza-logo.png",
"promotitle": "Pizza Tuesday",
"subtitle": "Buy one and get one free!",
"urlimage": "https://richmsg.io/media/images/pizza.jpeg",
"details": "When you order one large pizza on Tuesdays, we will give you another large pizza of your choice for free. Terms and conditions apply.",
"actiontext": "Order Now",
"urlaction": "https://abc.com",
"additionaltext": "Terms and Conditions Apply"
}13
[13.1]
Ticket card for an event.
eventEvent name
Name of the event for the ticket.
subtitleSubtitle
Subtitle of the event for the ticket.
urlimageImage URL
URL of the image to be displayed on the ticket.
datetimeEvent date and time
Date and time of the event.
venueVenue
Where the event is taking place.
seatSeat
Seat allocated to this ticket.
instructionsInstructions
Instructions associated with ticket and event.
Example
{
"event": "Strictly Dancing",
"subtitle": "Christmas Tour",
"urlimage": "https://melroselabs.com/phpqrcode/qrimg.php?qr=abc",
"datetime": "23 Jan 2020, 7pm",
"venue": "Dome, Glasgow, G1 1AB",
"instructions": "Arrive 30 minutes prior to the performance for security checks.",
"seat": "Q32",
"urlaction": "https://abc.com"
}14
[14.1]
Coupon card for use in retail with consumers.
logoLogo URL
URL of the logo image to be displayed on the coupon.
coupontitleCoupon title
Title to show on the coupon.
subtitleSubtitle
Subtitle of the coupon.
couponnumberCoupon number
Text showing coupon number. Can contain letters and numbers.
validuntildatetimeValidity date and time
Date and time the the coupon is valid until.
validlocationsValid locations
Locations at which the coupon is valid.
detailsDetails
Details on the use of this coupon for the holder of the coupon.
Example
{
"logo": "https://richmsg.io/media/images/sf-logo.png",
"coupontitle": "Sainsfield Coupon",
"subtitle": "Use this coupon to receive 5% discount on your next shop!",
"couponnumber": "9823782738213",
"validuntildatetime": "23 Jan 2020, 7pm",
"validlocations": "All UK stores",
"details": "Show this coupon when you go to the checkout to receive your discount."
}15
[15.1]
Card template to encourage customers to make reservations.
topImageImage URL
URL of the image to be displayed.
restaurantNameRestaurant name
Name of restaurant.
ratingValueRating value
Average rating from reviewers
reviewCountReview count
Number of reviews
messageMessage
Message to show encouraging patron to book.
timeWhenAvailabilityWhen available title
Title showing when times are available (e.g. "Tonight's availability")
timeSlotATimeslot A
Time for slot (e.g. "5:00")
timeSlotBTimeslot B
Time for slot (e.g. "5:00")
timeSlotCTimeslot C
Time for slot (e.g. "5:00")
timeSlotDTimeslot D
Time for slot (e.g. "5:00")
timeSlotETimeslot E
Time for slot (e.g. "5:00")
timeSlotFTimeslot F
Time for slot (e.g. "5:00")
urlActionAAction A URL
Website link (URL) that user is taken to when they click on the button for this time slot.
urlActionBAction B URL
Website link (URL) that user is taken to when they click on the button for this time slot.
urlActionCAction C URL
Website link (URL) that user is taken to when they click on the button for this time slot.
urlActionDAction D URL
Website link (URL) that user is taken to when they click on the button for this time slot.
urlActionEAction E URL
Website link (URL) that user is taken to when they click on the button for this time slot.
urlActionFAction F URL
Website link (URL) that user is taken to when they click on the button for this time slot.
Example
{
"restaurantName": "Benedicts restaurant",
"topImage": "https://richmsg.io/media/images/restaurant-burger-meal.jpg",
"ratingValue": 4.5,
"reviewCount": 319,
"message": "We're open tonight and all burger meals have 10% discount. Book a table before they go!",
"timeWhenAvailability": "Tonight's availability",
"timeSlotA": "5:30",
"urlActionA": "https://abc.com/A",
"timeSlotB": "7:30",
"urlActionB": "https://abc.com/B",
"timeSlotC": "8:00",
"urlActionC": "https://abc.com/C",
"timeSlotD": "8.30",
"urlActionD": "https://abc.com/D",
"timeSlotE": "9:00",
"urlActionE": "https://abc.com/E",
"timeSlotF": "other",
"urlActionF": "https://abc.com/F"
}Using the Service
The Melrose Labs Cards service is available using the REST API.
REST API
The Melrose Labs Cards service is available using our REST Rich Messaging API.
Create a card using the Rich Messaging Cards service with the RESTful Rich Messaging API
Example using cURL, Node.js, Python, PHP
Create a card using a template and get URL of new card.
Request:
curl https://api.melroselabs.com/richmessaging/card/ \
--header 'x-api-key: [API_KEY]' --header 'Content-Type: application/json' \
--data-raw '{"templateref":"10","data":{"propertyname":"Santorini Escape","urlimage":"https://richmsg.io/media/images/seaview-apartments.png","propertysummary":"A luxurious two-bedroom apartment with the best views over Santorini.","urldetails":"https://melroselabs.com/services/rich-messaging/","urlbooknow":"https://melroselabs.com/services/rich-messaging/"},"userref":"","callback":"","expires":""}'Response:
{ "messageID": "lpB", "shortURL": "https://richmsg.io/lpB" }Request:
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api.melroselabs.com/richmessaging/card/',
'headers': {
'x-api-key': '[API_KEY]',
'Content-Type': 'application/json'
},
body: JSON.stringify({"templateref":"10","data":{"propertyname":"Santorini Escape","urlimage":"https://richmsg.io/media/images/seaview-apartments.png","propertysummary":"A luxurious two-bedroom apartment with the best views over Santorini.","urldetails":"https://melroselabs.com/services/rich-messaging/","urlbooknow":"https://melroselabs.com/services/rich-messaging/"},"userref":"","callback":"","expires":""})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body); // response is of type application/json
});Response:
{ "messageID": "lpB", "shortURL": "https://richmsg.io/lpB" }Request:
import requests
import json
url = "https://api.melroselabs.com/richmessaging/card/"
payload = {
{"templateref":"10","data":{"propertyname":"Santorini Escape","urlimage":"https://richmsg.io/media/images/seaview-apartments.png","propertysummary":"A luxurious two-bedroom apartment with the best views over Santorini.","urldetails":"https://melroselabs.com/services/rich-messaging/","urlbooknow":"https://melroselabs.com/services/rich-messaging/"},"userref":"","callback":"","expires":""}
}
headers = {
'x-api-key': '[API_KEY]',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data = json.dumps(payload))
# response is of type application/json
print(response.text.encode('utf8'))
Response:
{ "messageID": "lpB", "shortURL": "https://richmsg.io/lpB" }Request:
<?php
$data = {"templateref":"10","data":{"propertyname":"Santorini Escape","urlimage":"https://richmsg.io/media/images/seaview-apartments.png","propertysummary":"A luxurious two-bedroom apartment with the best views over Santorini.","urldetails":"https://melroselabs.com/services/rich-messaging/","urlbooknow":"https://melroselabs.com/services/rich-messaging/"},"userref":"","callback":"","expires":""}
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.melroselabs.com/richmessaging/card/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $data,
CURLOPT_HTTPHEADER => array(
"x-api-key: [API_KEY]",
"Content-Type: application/json"
)
));
$response = curl_exec($curl);
curl_close($curl);
echo $response; // response is of type application/json
?>
Response:
{ "messageID": "lpB", "shortURL": "https://richmsg.io/lpB" }Get your API Key now and start using the Cards service REST API
SIGN-UP | LOGIN TO GET API KEYPricing
The Cards service is provided free-of-charge.
Data Retention and Data Privacy
Data retention and data privacy policies ensure that data is handled securely and in accordance with GDPR. Mobile telephone numbers and message content are kept encrypted at rest and in motion whenever possible. Account-level policies ensure that messages are erased in line with your organisation's data retention policy.
Service snapshot
- Rich media: images, audio, video and text
- Calls to actions for voice calls, text, forms, website links
- Integration with customer systems (e.g. booking or ordering system)
- Message state and tracking
- Editor for message creation
- SMS replacement - upgrade your mobile messaging