> This page is for version Legacy.
> For other versions, use one of these documentation indexes:
> - 2024-10-01 (default): https://docs.getkard.com/2024-10-01/llms.txt
> - Legacy: https://docs.getkard.com/legacy/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getkard.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getkard.com/_mcp/server.

# Get Offers

GET https://rewards-api.getkard.com/rewards/merchant/offers

Retrieve ALL national and local offer data regardless of whether a user is eligible to see them. This endpoint is a legacy endpoint and will no longer be maintained soon. Instead, use [Get Eligible Offers](/legacy/api/rewards/offers/get-offers-by-user) to retrieve national merchant data and build your [targeted offers UX experience](https://github.com/kard-financial/kard-postman?tab=readme-ov-file#b-targeted-offers). Local merchants and offers details can be found by calling the [Get Eligible Locations](/legacy/api/rewards/locations/get-locations-by-user) endpoint with the `includeLocal` query parameter.
Required scopes: `rewards:read`

Reference: https://docs.getkard.com/legacy/api/rewards/offers/get-offers

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://rewards-api.getkard.com` (Production, default)
- `https://test-rewards-api.getkard.com` (Sandbox)

## Request

### Query parameters

- `page` (integer, optional) — Page number [>= 0], (default = 0)
- `limit` (integer, optional) — Maximum number of offers [1 - 200], (default = 200)
- `source` (enum, optional) — Source of merchant associated with offer
  - Allowed values: `NATIONAL`, `LOCAL`
- `category` (enum, optional) — Category of merchant associated with offer. Please use URL Encode for non single word categories. (Food & Beverage should be Food%20%26%20Beverage)
  - Allowed values: `Arts & Entertainment`, `Baby, Kids & Toys`, `Books & Digital Media`, `Clothing, Shoes & Accessories`, `Computers, Electronics & Software`, `Convenience`, `Gas`, `Department Stores`, `Food & Beverage`, `Health & Beauty`, `Home & Garden`, `Miscellaneous`, `Occasions & Gifts`, `Pets`, `Sports & Outdoors`, `Supplies & Services`, `Travel`
- `name` (string, optional) — Name of offer
- `offerType` (enum, optional) — Type of offer (whether it is run online or in-store)
  - Allowed values: `INSTORE`, `ONLINE`
- `merchantId` (string, optional) — Merchant ID in Kard's system
- `isTargeted` (boolean, optional) — True returns targeted offers, false returns targeted and non-targeted offers
- `startDateStart` (datetime, optional) — Time in string format for offer startDate search (UTC)
- `startDateEnd` (datetime, optional) — Time in string format for offer startDate search (UTC)
- `expirationDateStart` (datetime, optional) — Time in string format for offer expirationDate search (UTC)
- `expirationDateEnd` (datetime, optional) — Time in string format for offer expirationDate search (UTC)
- `startDateSort` (enum, optional) — Sort offer start dates chronologically (1 for ascending, -1 for descending)
  - Allowed values: `1`, `-1`
- `expirationDateSort` (enum, optional) — Sort offer expiration dates chronologically (1 for ascending, -1 for descending)
  - Allowed values: `1`, `-1`
- `merchantNameSort` (enum, optional) — Sort merchant names (1 for A-Z, -1 for Z-A)
  - Allowed values: `1`, `-1`

## Response

### 200

- `list of Offer`

## Errors

### 400 Invalid Request

- `InvalidRequestUnion`

### 500 Internal Server Error

- `string`

### 401 Unauthorized Error

- `message` (string, required)

## Types

### Offer

- `_id` (string, required) — Offer ID in Kard's system
- `category` (enum, required) — Category of merchant associated with offer
  - Allowed values: `Arts & Entertainment`, `Baby, Kids & Toys`, `Books & Digital Media`, `Clothing, Shoes & Accessories`, `Computers, Electronics & Software`, `Convenience`, `Gas`, `Department Stores`, `Food & Beverage`, `Health & Beauty`, `Home & Garden`, `Miscellaneous`, `Occasions & Gifts`, `Pets`, `Sports & Outdoors`, `Supplies & Services`, `Travel`
- `commissionType` (enum, required) — Type of commission on offer (% or a flat $)
  - Allowed values: `FLAT`, `PERCENT`
- `createdDate` (datetime, required) — Created date of offer in Kard's system (UTC)
- `expirationDate` (datetime, required) — Expiration date of offer if applicable (UTC)
- `isLocationSpecific` (boolean, required) — True if offer is valid only for specific locations, false if valid for all locations. Note, this field is usually false
- `isTargeted` (boolean, required) — True returns targeted offers, false returns targeted and non-targeted offers
- `lastModified` (datetime, required) — Last modified date in Kard's system (UTC)
- `merchant` (OfferMerchant, required) — Merchant associated with the offer
- `name` (string, required) — Name of offer
- `offerType` (enum, required) — Type of offer (whether it is run online or in-store)
  - Allowed values: `INSTORE`, `ONLINE`
- `redeemableOnce` (boolean, required) — True if offer is redeemable only once, false if not
- `source` (enum, required) — Source of merchant associated with offer
  - Allowed values: `NATIONAL`, `LOCAL`
- `startDate` (datetime, required) — Beginning date of offer (UTC)
- `terms` (string, required) — Terms and conditions on offer
- `totalCommission` (double, required) — Offer commission going to issuer and user summed up
- `issuersCommission` (double, optional) — Commission going to the issuer
- `maxRewardAmount` (integer, optional) — Maximum Reward Amount, if available on offer
- `maxTransactionAmount` (integer, optional) — Maximum Transaction Amount allowed to redeem offer, if available on offer
- `minRewardAmount` (integer, optional) — Minimum Reward Amount, if available on offer
- `minTransactionAmount` (integer, optional) — Minimum Transaction Amount required to redeem offer, if available on offer
- `usersCommission` (double, optional) — Commission going to user

### RequestValidationErrorResponse

- `errors` (list of string, required)

### OfferMerchant

Merchant associated with the offer

- `_id` (string, required) — Merchant ID in Kard's system
- `acceptedCards` (list of enum, required)
  - Allowed values: `VISA`, `MASTERCARD`, `AMERICAN EXPRESS`, `DISCOVER`
- `category` (enum, required) — Category of merchant
  - Allowed values: `Arts & Entertainment`, `Baby, Kids & Toys`, `Books & Digital Media`, `Clothing, Shoes & Accessories`, `Computers, Electronics & Software`, `Convenience`, `Gas`, `Department Stores`, `Food & Beverage`, `Health & Beauty`, `Home & Garden`, `Miscellaneous`, `Occasions & Gifts`, `Pets`, `Sports & Outdoors`, `Supplies & Services`, `Travel`
- `description` (string, required) — Description of merchant
- `imgUrl` (string, required) — Merchant image asset URL
- `name` (string, required) — Name of merchant
- `type` (enum, required) — Type of merchant
  - Allowed values: `CARDLINKED`, `AFFILIATE`
- `websiteURL` (string, required) — Website URL of merchant
- `bannerImgUrl` (string, optional) — Merchant banner image asset URL

## Examples

**Response**

```json
[
  {
    "_id": "5e27318c9b346f00087fbb5c",
    "category": "Food & Beverage",
    "commissionType": "PERCENT",
    "createdDate": "2022-01-01T05:00:00Z",
    "expirationDate": "2022-01-01T05:00:00Z",
    "isLocationSpecific": false,
    "isTargeted": true,
    "lastModified": "2022-01-01T05:00:00Z",
    "merchant": {
      "_id": "123jbsdiertonb089586",
      "acceptedCards": [
        "VISA",
        "MASTERCARD",
        "AMERICAN EXPRESS",
        "DISCOVER"
      ],
      "category": "Food & Beverage",
      "description": "Some Merchant description",
      "imgUrl": "http://images.somemerchant.com",
      "name": "Some Merchant",
      "type": "CARDLINKED",
      "websiteURL": "http://www.somemerchant.com",
      "bannerImgUrl": "http://banner.somemerchant.com"
    },
    "name": "Some offer",
    "offerType": "INSTORE",
    "redeemableOnce": true,
    "source": "NATIONAL",
    "startDate": "2022-01-01T05:00:00Z",
    "terms": "some terms",
    "totalCommission": 4.3,
    "issuersCommission": 1.8,
    "maxRewardAmount": 20,
    "maxTransactionAmount": 20,
    "minRewardAmount": 5,
    "minTransactionAmount": 5,
    "usersCommission": 2.5
  }
]
```

**SDK Code**

```python
import requests

url = "https://rewards-api.getkard.com/rewards/merchant/offers"

querystring = {"limit":"1","page":"0","startDateSort":"-1","offerType":"INSTORE"}

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

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

print(response.json())
```

```javascript
const url = 'https://rewards-api.getkard.com/rewards/merchant/offers?limit=1&page=0&startDateSort=-1&offerType=INSTORE';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://rewards-api.getkard.com/rewards/merchant/offers?limit=1&page=0&startDateSort=-1&offerType=INSTORE"

	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(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://rewards-api.getkard.com/rewards/merchant/offers?limit=1&page=0&startDateSort=-1&offerType=INSTORE")

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
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://rewards-api.getkard.com/rewards/merchant/offers?limit=1&page=0&startDateSort=-1&offerType=INSTORE")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://rewards-api.getkard.com/rewards/merchant/offers?limit=1&page=0&startDateSort=-1&offerType=INSTORE', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://rewards-api.getkard.com/rewards/merchant/offers?limit=1&page=0&startDateSort=-1&offerType=INSTORE");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://rewards-api.getkard.com/rewards/merchant/offers?limit=1&page=0&startDateSort=-1&offerType=INSTORE")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```