Skip to main content
GET
/
connectors
/
consumers
/
{consumer_id}
/
brands
/
{brand_id}
/
offers
Gets consumers offer for a brand.
curl --request GET \
  --url https://api.sandbox.paylead.tech/connectors/consumers/{consumer_id}/brands/{brand_id}/offers \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.sandbox.paylead.tech/connectors/consumers/{consumer_id}/brands/{brand_id}/offers"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.sandbox.paylead.tech/connectors/consumers/{consumer_id}/brands/{brand_id}/offers', 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://api.sandbox.paylead.tech/connectors/consumers/{consumer_id}/brands/{brand_id}/offers",
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: Bearer <token>"
],
]);

$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://api.sandbox.paylead.tech/connectors/consumers/{consumer_id}/brands/{brand_id}/offers"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.sandbox.paylead.tech/connectors/consumers/{consumer_id}/brands/{brand_id}/offers")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.paylead.tech/connectors/consumers/{consumer_id}/brands/{brand_id}/offers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "name": "<string>",
  "description": "<string>",
  "id": "e2c32b4b-de61-459b-accf-a75f76247946",
  "logo": {
    "path": "<string>",
    "content_type": "<string>",
    "created_at": "2019-01-31T15:16:15.523309+00:00",
    "id": "e2c32b4b-de61-459b-accf-a75f76247946",
    "links": {
      "download": "<string>",
      "preview": "<string>"
    },
    "name": "<unknown>",
    "owner": "<string>"
  },
  "offers": [
    {
      "application_channel": "ONLINE",
      "application_url": "https://www.mybrand.fr",
      "capping_period": "<unknown>",
      "cashback_rate": 5,
      "default_cashback_rate": "<unknown>",
      "end_date": "2018-12-21T00:00:00+00:00",
      "frequency": "<unknown>",
      "frequency_counter": "<unknown>",
      "id": "e2c32b4b-de61-459b-accf-a75f76247946",
      "is_boosted": "<unknown>",
      "is_consumed": true,
      "legal_terms": "<unknown>",
      "max_amount": 250,
      "max_cashbacks_per_consumer": "<unknown>",
      "max_limit_transaction_amount": "<unknown>",
      "min_amount": 40,
      "name": "<string>",
      "picture": {
        "path": "<string>",
        "content_type": "<string>",
        "created_at": "2019-01-31T15:16:15.523309+00:00",
        "id": "e2c32b4b-de61-459b-accf-a75f76247946",
        "links": {
          "download": "<string>",
          "preview": "<string>"
        },
        "name": "<unknown>",
        "owner": "<string>"
      },
      "segments": [
        {
          "name": "<string>",
          "id": "e2c32b4b-de61-459b-accf-a75f76247946"
        }
      ],
      "source_transaction": true,
      "start_date": "2018-12-21T00:00:00+00:00",
      "status": "<string>",
      "type": "CASHBACK"
    }
  ],
  "universes": [
    {
      "id": "e2c32b4b-de61-459b-accf-a75f76247946",
      "name": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

brand_id
string<uuid>
required

Unique ID of the brand on PayLead system.

consumer_id
string
required

The id you used to create the given consumer

Query Parameters

cashback_rate
number

Filter by cashback_rate

Rate of reward used to calculate cashback amount

default_cashback_rate
number

Filter by default_cashback_rate

frequency
integer

Filter by frequency

Number of purchases before the customer gets a reward.

frequency__gt
integer

Filters all frequency higher than those provided in frequency__gt.

frequency__isnull
boolean

Filters all offers depending on whether they are a loyalty_offer or not. If "true", retrieves all the Offers that are not of loyalty type. If "false", retrieves all the Offers of loyalty type.

frequency_counter
integer

Filter by frequency_counter

Purchases made by the Consumer.

frequency_counter__gt
integer

Filters all frequency_counter higher than those provided in frequency_counter__gt.

frequency_counter__isnull
boolean

Filters all offers depending on whether they are a loyalty_offer or not. If "true", retrieves all the Offers that are not of loyalty type. If "false", retrieves all the Offers of loyalty type.

is_boosted
boolean

Filter by is_boosted

is_consumed
boolean

Filter by is_consumed

Has the consumer already consumed the coupon of the current offer? If true, yes. If false, no.

offer__id
string<uuid>

Filter by offer__id

Unique UUID of the offer

offer__name
string

Filter by offer__name

Name of the offer

source_transaction
boolean

Filter by source_transaction

If this flag is true, the transaction must come from the default bank of the program to generate a reward

Response

OK

name
string
required
read-only

Name of the object

description
string
read-only

description

id
string<uuid>
read-only

Unique ID of the object.

Example:

"e2c32b4b-de61-459b-accf-a75f76247946"

offers
object[]

List of Offer objects

universes
object[]

Universes