Campaigns (Touches)
Get All Campaigns
Retrieve a list of all active campaigns associated to the organization.
GET
/
api
/
v3
/
touches
Get All Campaigns
curl --request GET \
--url https://app.staging.sendo.so/api/v3/touches \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.staging.sendo.so/api/v3/touches"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.staging.sendo.so/api/v3/touches', 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/touches",
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://app.staging.sendo.so/api/v3/touches"
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://app.staging.sendo.so/api/v3/touches")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.staging.sendo.so/api/v3/touches")
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{
"current_page": 1,
"per_page": 1,
"total_posts": 5,
"touches": [
{
"id": 123456,
"name": "Sendoso Gift",
"start_date": "2023-10-25T00:00:00.000-07:00",
"end_date": null,
"description": "",
"created_at": "2023-10-25T05:21:59.000-07:00",
"user_id": 78901,
"gift_id": 39,
"starting_egift_price": null,
"ending_egift_price": null,
"status": "Active",
"is_default_price": true,
"delivery_type": "mail",
"hubspot_key": null,
"ship_to_countries": ["US", "ES", "CA"],
"currency": "USD"
}
]
}
Parameters
integer
The page number of the results you want to retrieve (the first page is 1). See Pagination for more information.
integer
The number of campaigns to be returned per page (max is 100). See Pagination for more information.
string
Optional parameter to filter the results by the gift type. Valid options are
mail which returns all physical item campaigns or email which returns all eGift campaigns.Response
integer
required
The current page being returned (used for pagination purposes).
integer
required
The number of results being returned per page (used for pagination purposes).
integer
required
The total number of campaigns (used for pagination purposes).
array
required
List of campaigns
Hide touch
Hide touch
integer
required
The campaign’s identifier.
string
required
The campaign’s name.
string
required
The campaign’s start date (in
ISO 8601 format). Gifts cannot be sent for this campaign before this start date.string
The campaign’s end date (in
ISO 8601 format). Gifts cannot be sent for this campaign after this end date.string
required
The campaign’s description.
string
required
The campaign’s creation date (in
ISO 8601 format).integer
required
The identifier of the user that created this campaign.
integer
required
The campaign’s general gift identifier.
number
The campaign’s
starting_egift_price and ending_egift_price represent the range amount from which the sender can pick the egift denominiation to send. Only present for eGift campaigns. When this range is present, is_default_price will be false.number
The campaign’s
starting_egift_price and ending_egift_price represent the range amount from which the sender can pick the egift denominiation to send. Only present for eGift campaigns. When this range is present, is_default_price will be false.string
required
The campaign’s status. It will ALWAYS be
Active since this endpoint only returns active campaigns.boolean
required
Whether or not the sender can pick the eGift amount from a range or if it is a set price.
string
required
The type of gift that is associated to this campaign. Valid options are
mail which means physical item or email which means eGift.string
required
The campaign’s key to be used for HubSpot integration.
array
required
List of countries that this campaign’s gift(s) can be sent to (in
ISO 3166-1 alpha-2 format).string
required
The campaign’s gift currency (in
ISO 4217 format).{
"current_page": 1,
"per_page": 1,
"total_posts": 5,
"touches": [
{
"id": 123456,
"name": "Sendoso Gift",
"start_date": "2023-10-25T00:00:00.000-07:00",
"end_date": null,
"description": "",
"created_at": "2023-10-25T05:21:59.000-07:00",
"user_id": 78901,
"gift_id": 39,
"starting_egift_price": null,
"ending_egift_price": null,
"status": "Active",
"is_default_price": true,
"delivery_type": "mail",
"hubspot_key": null,
"ship_to_countries": ["US", "ES", "CA"],
"currency": "USD"
}
]
}
⌘I
Get All Campaigns
curl --request GET \
--url https://app.staging.sendo.so/api/v3/touches \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.staging.sendo.so/api/v3/touches"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.staging.sendo.so/api/v3/touches', 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/touches",
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://app.staging.sendo.so/api/v3/touches"
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://app.staging.sendo.so/api/v3/touches")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.staging.sendo.so/api/v3/touches")
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{
"current_page": 1,
"per_page": 1,
"total_posts": 5,
"touches": [
{
"id": 123456,
"name": "Sendoso Gift",
"start_date": "2023-10-25T00:00:00.000-07:00",
"end_date": null,
"description": "",
"created_at": "2023-10-25T05:21:59.000-07:00",
"user_id": 78901,
"gift_id": 39,
"starting_egift_price": null,
"ending_egift_price": null,
"status": "Active",
"is_default_price": true,
"delivery_type": "mail",
"hubspot_key": null,
"ship_to_countries": ["US", "ES", "CA"],
"currency": "USD"
}
]
}