Consumer Web API
Connects consumer-facing web applications to Vourity's cloud platform
This API supports integrations with consumer-facing web applications.
It has the following endpoints:
- Landing Page Request
- Get Landing Page
- Add more...
Landing Page Request
This endpoint enables you to create a landing page and then send a request to Vourity's system to generate a digital voucher och digtal key (access token) for the customer.
curl --request POST \
--url https://your.apiurl.com/landing-page-request \
--header 'Authorization: Basic Vk9VUklUWTphOWRmMWVlMS0zNDI2LTQyZWUtYWJhNi0xNWJhMTBlZWRlOTA=' \
--header 'Content-Type: application/json' \
--header 'x-functions-key: /3pJ1IesxEj357t3avlcx32JvFZeADMuf64l5BPVtafC94VlFKu5pg==' \
--data '{"landingPageID":"103e1d5f-7313-406a-9409-e53205cdd40c","productID":"a58d3dd3-526d-4bf1-8692-b33a3ae17fd8","templateAccessTokenID":"79ea298b-d271-4b6b-8e1e-7cfee1d0a517","button":1,"email":"[email protected]"}'const fetch = require('node-fetch');
const url = 'https://your.apiurl.com/landing-page-request';
const options = {
method: 'POST',
headers: {
'x-functions-key': '/3pJ1IesxEj357t3avlcx32JvFZeADMuf64l5BPVtafC94VlFKu5pg==',
Authorization: 'Basic Vk9VUklUWTphOWRmMWVlMS0zNDI2LTQyZWUtYWJhNi0xNWJhMTBlZWRlOTA=',
'Content-Type': 'application/json'
},
body: JSON.stringify({
landingPageID: '103e1d5f-7313-406a-9409-e53205cdd40c',
productID: 'a58d3dd3-526d-4bf1-8692-b33a3ae17fd8',
templateAccessTokenID: '79ea298b-d271-4b6b-8e1e-7cfee1d0a517',
button: 1,
email: '[email protected]'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://your.apiurl.com/landing-page-request")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-functions-key"] = '/3pJ1IesxEj357t3avlcx32JvFZeADMuf64l5BPVtafC94VlFKu5pg=='
request["Authorization"] = 'Basic Vk9VUklUWTphOWRmMWVlMS0zNDI2LTQyZWUtYWJhNi0xNWJhMTBlZWRlOTA='
request["Content-Type"] = 'application/json'
request.body = "{\"landingPageID\":\"103e1d5f-7313-406a-9409-e53205cdd40c\",\"productID\":\"a58d3dd3-526d-4bf1-8692-b33a3ae17fd8\",\"templateAccessTokenID\":\"79ea298b-d271-4b6b-8e1e-7cfee1d0a517\",\"button\":1,\"email\":\"[email protected]\"}"
response = http.request(request)
puts response.read_bodyconst options = {
method: 'POST',
headers: {
'x-functions-key': '/3pJ1IesxEj357t3avlcx32JvFZeADMuf64l5BPVtafC94VlFKu5pg==',
Authorization: 'Basic Vk9VUklUWTphOWRmMWVlMS0zNDI2LTQyZWUtYWJhNi0xNWJhMTBlZWRlOTA=',
'Content-Type': 'application/json'
},
body: JSON.stringify({
landingPageID: '103e1d5f-7313-406a-9409-e53205cdd40c',
productID: 'a58d3dd3-526d-4bf1-8692-b33a3ae17fd8',
templateAccessTokenID: '79ea298b-d271-4b6b-8e1e-7cfee1d0a517',
button: 1,
email: '[email protected]'
})
};
fetch('https://your.apiurl.com/landing-page-request', options)
.then(response => console.log(response))
.catch(err => console.error(err));import requests
url = "https://your.apiurl.com/landing-page-request"
payload = {
"landingPageID": "103e1d5f-7313-406a-9409-e53205cdd40c",
"productID": "a58d3dd3-526d-4bf1-8692-b33a3ae17fd8",
"templateAccessTokenID": "79ea298b-d271-4b6b-8e1e-7cfee1d0a517",
"button": 1,
"email": "[email protected]"
}
headers = {
"x-functions-key": "/3pJ1IesxEj357t3avlcx32JvFZeADMuf64l5BPVtafC94VlFKu5pg==",
"Authorization": "Basic Vk9VUklUWTphOWRmMWVlMS0zNDI2LTQyZWUtYWJhNi0xNWJhMTBlZWRlOTA=",
"Content-Type": "application/json"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)Get Landing Page
Add ...
curl --request GET \
--url https://your.apiurl.com/landing-page/3bded336-b958-44ca-909d-975a10834074 \
--header 'x-functions-key: /3pJ1IesxEj357t3avlcx32JvFZeADMuf64l5BPVtafC94VlFKu5pg=='const fetch = require('node-fetch');
const url = 'https://your.apiurl.com/landing-page/3bded336-b958-44ca-909d-975a10834074';
const options = {
method: 'GET',
headers: {'x-functions-key': '/3pJ1IesxEj357t3avlcx32JvFZeADMuf64l5BPVtafC94VlFKu5pg=='}
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://your.apiurl.com/landing-page/3bded336-b958-44ca-909d-975a10834074")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-functions-key"] = '/3pJ1IesxEj357t3avlcx32JvFZeADMuf64l5BPVtafC94VlFKu5pg=='
response = http.request(request)
puts response.read_bodyconst options = {
method: 'GET',
headers: {'x-functions-key': '/3pJ1IesxEj357t3avlcx32JvFZeADMuf64l5BPVtafC94VlFKu5pg=='}
};
fetch('https://your.apiurl.com/landing-page/3bded336-b958-44ca-909d-975a10834074', options)
.then(response => console.log(response))
.catch(err => console.error(err));import requests
url = "https://your.apiurl.com/landing-page/3bded336-b958-44ca-909d-975a10834074"
headers = {"x-functions-key": "/3pJ1IesxEj357t3avlcx32JvFZeADMuf64l5BPVtafC94VlFKu5pg=="}
response = requests.request("GET", url, headers=headers)
print(response.text)Updated 6 months ago
What's Next...
