Skip to main content
GET
/
connectors
/
m2m
/
offers
Get the list of Offers
curl --request GET \
  --url https://api.sandbox.paylead.tech/connectors/m2m/offers \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.sandbox.paylead.tech/connectors/m2m/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/m2m/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/m2m/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/m2m/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/m2m/offers")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.paylead.tech/connectors/m2m/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
{
  "items": [
    {
      "description": "<string>",
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "legal_terms": "<string>",
      "name": "<string>",
      "reference": "<string>",
      "application_url": null,
      "brand": {
        "cashback_validation_delay_days": "<unknown>",
        "description": null,
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "legal_terms": null,
        "logo": {
          "content_type": "<string>",
          "created_at": "2023-11-07T05:31:56Z",
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "links": {
            "download": "<string>",
            "preview": "<string>"
          },
          "name": "<string>",
          "owner": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "path": "<string>"
        },
        "name": "<string>",
        "primary_language": "<unknown>",
        "secondary_languages": "<unknown>",
        "universes": [
          {
            "children": null,
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "name": "<string>",
            "parent_id": "<unknown>"
          }
        ]
      },
      "brand_id": "<unknown>",
      "cashback_rate": "<unknown>",
      "completed_at": "2023-11-07T05:31:56Z",
      "created_at": "2023-11-07T05:31:56Z",
      "deactivated_at": "2023-11-07T05:31:56Z",
      "end_date": "2023-11-07T05:31:56Z",
      "is_ab_tested": true,
      "is_main_source_transaction": true,
      "is_targeted": "<unknown>",
      "max_amount": 123,
      "max_cashbacks_per_consumer": 123,
      "min_amount": 123,
      "picture": "<unknown>",
      "picture_id": "<unknown>",
      "publication_date": "2023-11-07T05:31:56Z",
      "segments": [
        "<unknown>"
      ],
      "start_date": "2023-11-07T05:31:56Z",
      "status": "<string>",
      "strategy_id": "<unknown>",
      "timezone": "<unknown>",
      "translation": "<unknown>"
    }
  ],
  "meta": {
    "page": 123,
    "per_page": 123,
    "total": 123
  }
}

Authorizations

Authorization
string
header
required

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

Query Parameters

brand__id
string<uuid>

Filter by brand__id

end_date
string

Filter by end_date

page
integer

the page number

Required range: x >= 1
per_page
integer

the number of elements per page

Required range: 1 <= x <= 100
sort
enum<string>

Sort by given attribute

Available options:
start_date,
end_date,
type,
brand__id,
status,
-start_date,
-end_date,
-type,
-brand__id,
-status
start_date
string

Filter by start_date

Filtering on start date between -- after -- before --

status
string

Filter by status

type
enum<string>

Filter by type

Available options:
CASHBACK,
UNIQUE_COUPON,
GENERIC_COUPON,
VOUCHER,
AFFILIATION,
LBS_CASHBACK

Response

OK

items
object[]
meta
object