Skip to main content
GET
/
reward_fulfillments
List reward fulfillments
curl --request GET \
  --url https://api.smile.io/v1/reward_fulfillments \
  --header 'Authorization: Bearer <token>'
package main

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

func main() {

url := "https://api.smile.io/v1/reward_fulfillments"

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.smile.io/v1/reward_fulfillments")
.header("Authorization", "Bearer <token>")
.asString();
const url = 'https://api.smile.io/v1/reward_fulfillments';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.smile.io/v1/reward_fulfillments",
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;
}
$headers=@{}
$headers.Add("Authorization", "Bearer <token>")
$response = Invoke-WebRequest -Uri 'https://api.smile.io/v1/reward_fulfillments' -Method GET -Headers $headers
import requests

url = "https://api.smile.io/v1/reward_fulfillments"

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

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

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.smile.io/v1/reward_fulfillments")

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
{
  "reward_fulfillments": [
    {
      "id": 625478984,
      "name": "$5 off coupon",
      "code": "5off-e26d02e39149",
      "customer_id": 304169228,
      "fulfillment_status": "issued",
      "image_url": "https://platform-images.smilecdn.co/9283449.png",
      "action_text": "<string>",
      "action_url": "<string>",
      "usage_instructions": "Use this discount code on your next order!",
      "terms_and_conditions": "Reward expires on June 7, 2025. Reward can only be used on purchase of $50 or more. Reward can only be used on select product collections.",
      "expires_at": "2025-06-07T23:59:59.999Z",
      "usage_status": "unused",
      "used_at": "2023-11-07T05:31:56Z",
      "created_at": "2024-12-07T20:15:27.893Z",
      "updated_at": "2024-12-07T20:15:27.893Z"
    }
  ],
  "metadata": {
    "next_cursor": "aWQ6MixkaXJlY3Rpb246bmV4dA==",
    "previous_cursor": ""
  }
}
This endpoint requires the scope.
Results are sorted by id in descending order. This endpoint is commonly used to display a list of a customer’s rewards (e.g. discount codes).

Authorizations

Authorization
string
header
required

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

Query Parameters

customer_id
integer

Filter results to only reward fulfillments with the provided Smile customer ID.

fulfillment_status
enum<string>

Filter results to only reward fulfillments whose fulfillment status matches the provided value.

Available options:
pending,
issued,
cancelled,
failed
usage_status
enum<string>

Filter results to only reward fulfillments whose usage status matches the provided values.

Available options:
used,
unused,
untracked
updated_at_min
string<date-time>

Filter results to only reward fulfillments updated after the provided date and time.

limit
integer
default:50

The maximum number of reward fulfillments to retrieve.

Required range: 1 <= x <= 250
Example:

1

cursor
string

Cursor for the page of reward fulfillments to retrieve.

Response

200 - application/json
reward_fulfillments
object[]
metadata
object