Retrieve a points product
curl --request GET \
--url https://api.smile.io/v1/points_products/{id} \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.smile.io/v1/points_products/{id}"
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/points_products/{id}")
.header("Authorization", "Bearer <token>")
.asString();const url = 'https://api.smile.io/v1/points_products/{id}';
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/points_products/{id}",
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/points_products/{id}' -Method GET -Headers $headersimport requests
url = "https://api.smile.io/v1/points_products/{id}"
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/points_products/{id}")
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{
"points_product": {
"id": 132456921,
"exchange_type": "variable",
"exchange_description": "100 Points = $1 off",
"points_price": 123,
"variable_points_step": 100,
"variable_points_step_reward_value": 1,
"variable_points_min": 100,
"variable_points_max": 5000,
"reward": {
"id": 924565472,
"name": "Order discount",
"description": "<string>",
"image_url": "https://platform-images.smilecdn.co/3755938.png",
"created_at": "2024-04-04T15:10:42.030Z",
"updated_at": "2024-04-04T15:10:42.030Z"
},
"created_at": "2024-04-04T15:10:42.030Z",
"updated_at": "2024-04-04T15:10:42.030Z"
}
}Points Products
Retrieve a points product
Retrieves a single points product by ID.
GET
/
points_products
/
{id}
Retrieve a points product
curl --request GET \
--url https://api.smile.io/v1/points_products/{id} \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.smile.io/v1/points_products/{id}"
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/points_products/{id}")
.header("Authorization", "Bearer <token>")
.asString();const url = 'https://api.smile.io/v1/points_products/{id}';
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/points_products/{id}",
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/points_products/{id}' -Method GET -Headers $headersimport requests
url = "https://api.smile.io/v1/points_products/{id}"
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/points_products/{id}")
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{
"points_product": {
"id": 132456921,
"exchange_type": "variable",
"exchange_description": "100 Points = $1 off",
"points_price": 123,
"variable_points_step": 100,
"variable_points_step_reward_value": 1,
"variable_points_min": 100,
"variable_points_max": 5000,
"reward": {
"id": 924565472,
"name": "Order discount",
"description": "<string>",
"image_url": "https://platform-images.smilecdn.co/3755938.png",
"created_at": "2024-04-04T15:10:42.030Z",
"updated_at": "2024-04-04T15:10:42.030Z"
},
"created_at": "2024-04-04T15:10:42.030Z",
"updated_at": "2024-04-04T15:10:42.030Z"
}
}This endpoint requires the scope.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the points product to retrieve.
Response
200 - application/json
The points product was successfully retrieved.
Show child attributes
Show child attributes
⌘I