curl --request GET \
--url https://{host}/promotion/v2/coupons \
--header 'Authorization: <api-key>' \
--header 'memberId: <memberid>'import requests
url = "https://{host}/promotion/v2/coupons"
headers = {
"memberId": "<memberid>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {memberId: '<memberid>', Authorization: '<api-key>'}};
fetch('https://{host}/promotion/v2/coupons', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/promotion/v2/coupons",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"memberId: <memberid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{host}/promotion/v2/coupons"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("memberId", "<memberid>")
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{host}/promotion/v2/coupons")
.header("memberId", "<memberid>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/promotion/v2/coupons")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["memberId"] = '<memberid>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_bodyGet customer coupons
Your backend or the app calls this to show a customer their coupons. Returns the customer’s coupons that are not expired,
have been assigned, and have not yet been picked up in store, with their store and chain lists and discounts included,
ordered by offer type, then display priority, then pick-up date. The customer is given in the memberId header.
Filtering
campaignTypes: only coupons of these offer types. Omitted, every type is returned.storeIdandchainId: only coupons for offers that include this store or chain. The two can be combined.preferredStore: filters likestoreIdand additionally returns the customer’s preferred-store coupons, which are returned only when this parameter is set. Cannot be combined withstoreIdorchainId; sending them together returns 400. A preferred-store coupon the customer activated before changing their store is no longer listed, but can still be picked up in the store it was activated for.queryRedeemed=trueadds coupons already picked up in store, as long as they are not expired.includePreview=trueadds coupons of offers that have not started yet.includeBonus=trueadds coupons of offers that grant bonus points instead of a discount.
activationLimits in the response lists, per offer type that has one, how many coupons the customer may have activated
at a time.
Households
Where your environment uses households, the list also holds the coupons of the customer’s household. An offer with
scope: Household has one coupon per household, which everyone in the household sees and any of them can use. The
household comes from the X-Household-Id header when your backend sends it; otherwise Lobyco looks it up for the
customer, who must then be in exactly one household. The offer’s audience is still checked for the customer, never for
the household.
curl --request GET \
--url https://{host}/promotion/v2/coupons \
--header 'Authorization: <api-key>' \
--header 'memberId: <memberid>'import requests
url = "https://{host}/promotion/v2/coupons"
headers = {
"memberId": "<memberid>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {memberId: '<memberid>', Authorization: '<api-key>'}};
fetch('https://{host}/promotion/v2/coupons', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/promotion/v2/coupons",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"memberId: <memberid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{host}/promotion/v2/coupons"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("memberId", "<memberid>")
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{host}/promotion/v2/coupons")
.header("memberId", "<memberid>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/promotion/v2/coupons")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["memberId"] = '<memberid>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_bodyAuthorizations
Headers
Query Parameters
Response
The customer's coupons with the filters applied, and the activation limits. The list is empty when nothing matches.
The coupons that match a coupon list call, with the activation limits that apply.