curl --request GET \
--url https://{host}/promotion/v3/offers/{offerId} \
--header 'Authorization: <api-key>'import requests
url = "https://{host}/promotion/v3/offers/{offerId}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://{host}/promotion/v3/offers/{offerId}', 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/v3/offers/{offerId}",
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>"
],
]);
$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/v3/offers/{offerId}"
req, _ := http.NewRequest("GET", url, nil)
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/v3/offers/{offerId}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/promotion/v3/offers/{offerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_bodyGet offer by id
Returns one offer. offerId is the id the offer was created with. Store and chain lists, the discount and the statistics
are left out unless requested with includedRelations.
curl --request GET \
--url https://{host}/promotion/v3/offers/{offerId} \
--header 'Authorization: <api-key>'import requests
url = "https://{host}/promotion/v3/offers/{offerId}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://{host}/promotion/v3/offers/{offerId}', 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/v3/offers/{offerId}",
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>"
],
]);
$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/v3/offers/{offerId}"
req, _ := http.NewRequest("GET", url, nil)
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/v3/offers/{offerId}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/promotion/v3/offers/{offerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_bodyAuthorizations
Query Parameters
Extra details to include. Omitted, storeIds, chainIds, discount and statistics are null.
Extra details that can be requested for each offer.
StoresAndChains: fillstoreIdsandchainIdswith the stores and chains the offer applies to.Statistics: fillstatisticswith the offer's coupon counts.Discount: filldiscountwith the offer's discount and its rules.Affiliations: fill the discount's product and category affiliations.
This list is not final. Lobyco may add a value at any time, and a consumer must not fail on a value it does not know.
StoresAndChains, Statistics, Discount, Affiliations Response
The offer.
An offer as stored, with the details that were requested. A deleted offer from a delta sync carries only offerId and deletedAt.
UTC time the offer was deleted. Set only on a deleted offer returned by a delta sync with updatedSince; null on every
other offer. On a deleted offer only offerId and deletedAt carry data: ignore every other field, which is null,
false or 0, and remove the offer from your copy.