SmartSend
Send a Recommendation
Automatically pick and send a recommendation to a recipient.
POST
/
api
/
v3
/
smartsend
/
recommendations
/
send
Send a Recommendation
curl --request POST \
--url https://app.staging.sendo.so/api/v3/smartsend/recommendations/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recipient_email": "<string>",
"recipient_first_name": "<string>",
"recipient_last_name": "<string>",
"price_lte_usd": 123,
"ship_to_country_code": "<string>",
"message": "<string>",
"gift_exchange_enabled": true,
"meeting_url": "<string>",
"require_approval": true
}
'import requests
url = "https://app.staging.sendo.so/api/v3/smartsend/recommendations/send"
payload = {
"recipient_email": "<string>",
"recipient_first_name": "<string>",
"recipient_last_name": "<string>",
"price_lte_usd": 123,
"ship_to_country_code": "<string>",
"message": "<string>",
"gift_exchange_enabled": True,
"meeting_url": "<string>",
"require_approval": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
recipient_email: '<string>',
recipient_first_name: '<string>',
recipient_last_name: '<string>',
price_lte_usd: 123,
ship_to_country_code: '<string>',
message: '<string>',
gift_exchange_enabled: true,
meeting_url: '<string>',
require_approval: true
})
};
fetch('https://app.staging.sendo.so/api/v3/smartsend/recommendations/send', 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://app.staging.sendo.so/api/v3/smartsend/recommendations/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'recipient_email' => '<string>',
'recipient_first_name' => '<string>',
'recipient_last_name' => '<string>',
'price_lte_usd' => 123,
'ship_to_country_code' => '<string>',
'message' => '<string>',
'gift_exchange_enabled' => true,
'meeting_url' => '<string>',
'require_approval' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.staging.sendo.so/api/v3/smartsend/recommendations/send"
payload := strings.NewReader("{\n \"recipient_email\": \"<string>\",\n \"recipient_first_name\": \"<string>\",\n \"recipient_last_name\": \"<string>\",\n \"price_lte_usd\": 123,\n \"ship_to_country_code\": \"<string>\",\n \"message\": \"<string>\",\n \"gift_exchange_enabled\": true,\n \"meeting_url\": \"<string>\",\n \"require_approval\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.staging.sendo.so/api/v3/smartsend/recommendations/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"recipient_email\": \"<string>\",\n \"recipient_first_name\": \"<string>\",\n \"recipient_last_name\": \"<string>\",\n \"price_lte_usd\": 123,\n \"ship_to_country_code\": \"<string>\",\n \"message\": \"<string>\",\n \"gift_exchange_enabled\": true,\n \"meeting_url\": \"<string>\",\n \"require_approval\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.staging.sendo.so/api/v3/smartsend/recommendations/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"recipient_email\": \"<string>\",\n \"recipient_first_name\": \"<string>\",\n \"recipient_last_name\": \"<string>\",\n \"price_lte_usd\": 123,\n \"ship_to_country_code\": \"<string>\",\n \"message\": \"<string>\",\n \"gift_exchange_enabled\": true,\n \"meeting_url\": \"<string>\",\n \"require_approval\": true\n}"
response = http.request(request)
puts response.read_body{
"products": [
{
"variant_id": "<string>"
}
],
"send": {
"id": "<string>"
}
}Required Auth Scopes
smartsend
Body
The email of the recipient.
The first name of the recipient.
The last name of the recipient.
Limit the maximum price of product in USD.
Restrict the products to ship to a specific country.
An optional message to include with the product.
Optional parameter. If set to true, recipients will be able to exchange the gift for a similar value or lower value item available in the marketplace.
An optional URL to a meeting.
Optional parameter. If set to true, the send will be placed on hold for a manager to approve it from the send tracker.
Response
⌘I
Send a Recommendation
curl --request POST \
--url https://app.staging.sendo.so/api/v3/smartsend/recommendations/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recipient_email": "<string>",
"recipient_first_name": "<string>",
"recipient_last_name": "<string>",
"price_lte_usd": 123,
"ship_to_country_code": "<string>",
"message": "<string>",
"gift_exchange_enabled": true,
"meeting_url": "<string>",
"require_approval": true
}
'import requests
url = "https://app.staging.sendo.so/api/v3/smartsend/recommendations/send"
payload = {
"recipient_email": "<string>",
"recipient_first_name": "<string>",
"recipient_last_name": "<string>",
"price_lte_usd": 123,
"ship_to_country_code": "<string>",
"message": "<string>",
"gift_exchange_enabled": True,
"meeting_url": "<string>",
"require_approval": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
recipient_email: '<string>',
recipient_first_name: '<string>',
recipient_last_name: '<string>',
price_lte_usd: 123,
ship_to_country_code: '<string>',
message: '<string>',
gift_exchange_enabled: true,
meeting_url: '<string>',
require_approval: true
})
};
fetch('https://app.staging.sendo.so/api/v3/smartsend/recommendations/send', 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://app.staging.sendo.so/api/v3/smartsend/recommendations/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'recipient_email' => '<string>',
'recipient_first_name' => '<string>',
'recipient_last_name' => '<string>',
'price_lte_usd' => 123,
'ship_to_country_code' => '<string>',
'message' => '<string>',
'gift_exchange_enabled' => true,
'meeting_url' => '<string>',
'require_approval' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.staging.sendo.so/api/v3/smartsend/recommendations/send"
payload := strings.NewReader("{\n \"recipient_email\": \"<string>\",\n \"recipient_first_name\": \"<string>\",\n \"recipient_last_name\": \"<string>\",\n \"price_lte_usd\": 123,\n \"ship_to_country_code\": \"<string>\",\n \"message\": \"<string>\",\n \"gift_exchange_enabled\": true,\n \"meeting_url\": \"<string>\",\n \"require_approval\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.staging.sendo.so/api/v3/smartsend/recommendations/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"recipient_email\": \"<string>\",\n \"recipient_first_name\": \"<string>\",\n \"recipient_last_name\": \"<string>\",\n \"price_lte_usd\": 123,\n \"ship_to_country_code\": \"<string>\",\n \"message\": \"<string>\",\n \"gift_exchange_enabled\": true,\n \"meeting_url\": \"<string>\",\n \"require_approval\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.staging.sendo.so/api/v3/smartsend/recommendations/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"recipient_email\": \"<string>\",\n \"recipient_first_name\": \"<string>\",\n \"recipient_last_name\": \"<string>\",\n \"price_lte_usd\": 123,\n \"ship_to_country_code\": \"<string>\",\n \"message\": \"<string>\",\n \"gift_exchange_enabled\": true,\n \"meeting_url\": \"<string>\",\n \"require_approval\": true\n}"
response = http.request(request)
puts response.read_body{
"products": [
{
"variant_id": "<string>"
}
],
"send": {
"id": "<string>"
}
}