cURL
curl --request GET \
--url 'https://api.branduo.io/v1/campaigns/offers?type=post-purchase' \
--header 'X-Api-Key: YOUR_API_KEY' \
--header 'X-Platform-Id: YOUR_PLATFORM_ID'
const response = await fetch("https://api.branduo.io/v1/campaigns/offers?type=post-purchase", {
method: "GET",
headers: {
"X-Api-Key": "YOUR_API_KEY",
"X-Platform-Id": "YOUR_PLATFORM_ID",
},
});
const data = await response.json();
import requests
response = requests.request(
"GET",
"https://api.branduo.io/v1/campaigns/offers?type=post-purchase",
headers={
"X-Api-Key": "YOUR_API_KEY",
"X-Platform-Id": "YOUR_PLATFORM_ID",
},
)
data = response.json()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.branduo.io/v1/campaigns/offers?type=post-purchase",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: YOUR_API_KEY",
"X-Platform-Id: YOUR_PLATFORM_ID"
],
]);
$response = curl_exec($curl);
curl_close($curl);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.branduo.io/v1/campaigns/offers?type=post-purchase"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "YOUR_API_KEY")
req.Header.Add("X-Platform-Id", "YOUR_PLATFORM_ID")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
require "uri"
require "net/http"
url = URI("https://api.branduo.io/v1/campaigns/offers?type=post-purchase")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP.const_get("GET".capitalize).new(url)
request["X-Api-Key"] = "YOUR_API_KEY"
request["X-Platform-Id"] = "YOUR_PLATFORM_ID"
response = http.request(request)
puts response.read_body
using var client = new HttpClient();
using var request = new HttpRequestMessage(
new HttpMethod("GET"),
"https://api.branduo.io/v1/campaigns/offers?type=post-purchase");
request.Headers.TryAddWithoutValidation("X-Api-Key", "YOUR_API_KEY");
request.Headers.TryAddWithoutValidation("X-Platform-Id", "YOUR_PLATFORM_ID");
using var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class BranduoRequest {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.branduo.io/v1/campaigns/offers?type=post-purchase"))
.header("X-Api-Key", "YOUR_API_KEY")
.header("X-Platform-Id", "YOUR_PLATFORM_ID")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
{
"offers": [
{
"imageUrl": "https://example.com/offer.png",
"referralUrl": "https://example.com/discount/BRANDUO25?ref=bd_1234",
"title": "Claim 25% off",
"subtitle": "Sheet sets, pillowcases & eye masks"
}
]
}
{
"error": "invalid_offer_type",
"message": "type must be one of the offer types listed in allowed.",
"allowed": ["post-purchase"]
}
{
"error": "unauthorized",
"message": "Invalid or missing API key or access token."
}
Campaigns
Get offers
Retrieve the partner offers to show for the authenticated brand, by offer type.
GET
/
campaigns
/
offers
cURL
curl --request GET \
--url 'https://api.branduo.io/v1/campaigns/offers?type=post-purchase' \
--header 'X-Api-Key: YOUR_API_KEY' \
--header 'X-Platform-Id: YOUR_PLATFORM_ID'
const response = await fetch("https://api.branduo.io/v1/campaigns/offers?type=post-purchase", {
method: "GET",
headers: {
"X-Api-Key": "YOUR_API_KEY",
"X-Platform-Id": "YOUR_PLATFORM_ID",
},
});
const data = await response.json();
import requests
response = requests.request(
"GET",
"https://api.branduo.io/v1/campaigns/offers?type=post-purchase",
headers={
"X-Api-Key": "YOUR_API_KEY",
"X-Platform-Id": "YOUR_PLATFORM_ID",
},
)
data = response.json()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.branduo.io/v1/campaigns/offers?type=post-purchase",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: YOUR_API_KEY",
"X-Platform-Id: YOUR_PLATFORM_ID"
],
]);
$response = curl_exec($curl);
curl_close($curl);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.branduo.io/v1/campaigns/offers?type=post-purchase"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "YOUR_API_KEY")
req.Header.Add("X-Platform-Id", "YOUR_PLATFORM_ID")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
require "uri"
require "net/http"
url = URI("https://api.branduo.io/v1/campaigns/offers?type=post-purchase")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP.const_get("GET".capitalize).new(url)
request["X-Api-Key"] = "YOUR_API_KEY"
request["X-Platform-Id"] = "YOUR_PLATFORM_ID"
response = http.request(request)
puts response.read_body
using var client = new HttpClient();
using var request = new HttpRequestMessage(
new HttpMethod("GET"),
"https://api.branduo.io/v1/campaigns/offers?type=post-purchase");
request.Headers.TryAddWithoutValidation("X-Api-Key", "YOUR_API_KEY");
request.Headers.TryAddWithoutValidation("X-Platform-Id", "YOUR_PLATFORM_ID");
using var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class BranduoRequest {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.branduo.io/v1/campaigns/offers?type=post-purchase"))
.header("X-Api-Key", "YOUR_API_KEY")
.header("X-Platform-Id", "YOUR_PLATFORM_ID")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
{
"offers": [
{
"imageUrl": "https://example.com/offer.png",
"referralUrl": "https://example.com/discount/BRANDUO25?ref=bd_1234",
"title": "Claim 25% off",
"subtitle": "Sheet sets, pillowcases & eye masks"
}
]
}
{
"error": "invalid_offer_type",
"message": "type must be one of the offer types listed in allowed.",
"allowed": ["post-purchase"]
}
{
"error": "unauthorized",
"message": "Invalid or missing API key or access token."
}
Returns the partner offer cards to show for the authenticated brand, for one offer type. For example,
Each offer returned counts as one view for your platform. Request offers when you are about to show them, not ahead of time. This endpoint allows 3,000 requests per minute; see Rate limiting.
post-purchase offers appear on a store’s order confirmation page.
cURL
curl --request GET \
--url 'https://api.branduo.io/v1/campaigns/offers?type=post-purchase' \
--header 'X-Api-Key: YOUR_API_KEY' \
--header 'X-Platform-Id: YOUR_PLATFORM_ID'
const response = await fetch("https://api.branduo.io/v1/campaigns/offers?type=post-purchase", {
method: "GET",
headers: {
"X-Api-Key": "YOUR_API_KEY",
"X-Platform-Id": "YOUR_PLATFORM_ID",
},
});
const data = await response.json();
import requests
response = requests.request(
"GET",
"https://api.branduo.io/v1/campaigns/offers?type=post-purchase",
headers={
"X-Api-Key": "YOUR_API_KEY",
"X-Platform-Id": "YOUR_PLATFORM_ID",
},
)
data = response.json()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.branduo.io/v1/campaigns/offers?type=post-purchase",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: YOUR_API_KEY",
"X-Platform-Id: YOUR_PLATFORM_ID"
],
]);
$response = curl_exec($curl);
curl_close($curl);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.branduo.io/v1/campaigns/offers?type=post-purchase"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "YOUR_API_KEY")
req.Header.Add("X-Platform-Id", "YOUR_PLATFORM_ID")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
require "uri"
require "net/http"
url = URI("https://api.branduo.io/v1/campaigns/offers?type=post-purchase")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP.const_get("GET".capitalize).new(url)
request["X-Api-Key"] = "YOUR_API_KEY"
request["X-Platform-Id"] = "YOUR_PLATFORM_ID"
response = http.request(request)
puts response.read_body
using var client = new HttpClient();
using var request = new HttpRequestMessage(
new HttpMethod("GET"),
"https://api.branduo.io/v1/campaigns/offers?type=post-purchase");
request.Headers.TryAddWithoutValidation("X-Api-Key", "YOUR_API_KEY");
request.Headers.TryAddWithoutValidation("X-Platform-Id", "YOUR_PLATFORM_ID");
using var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class BranduoRequest {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.branduo.io/v1/campaigns/offers?type=post-purchase"))
.header("X-Api-Key", "YOUR_API_KEY")
.header("X-Platform-Id", "YOUR_PLATFORM_ID")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
Authenticate with the API key in the playground, or send an OAuth access token
in
Authorization. See Authentication.Which platform to send
Every call names the platform that displays the offers. Views and orders from these offers are credited to that platform.- OAuth: an access token authorized with your platform ID already carries it. You don’t need the header. If you send it anyway, it must match.
- API key: send your platform ID in
X-Platform-Id. - A brand showing offers on its own site, with no tech partner: send Branduo’s platform ID,
84605dab-79fd-4b37-857c-bfd59bd9c436.
Query parameters
string
required
The offer type. Today the only value is
post-purchase: offers shown after
checkout, such as on the order confirmation page.Headers
string
The UUID of the platform that displays these offers. Required with an API key.
Optional with an OAuth access token that already carries your platform.
Response
object[]
required
The offers to show. The array is empty when the brand has no active campaign
or no available offers.
Errors
| Status | error | Cause |
|---|---|---|
400 Bad Request | invalid_offer_type | type is missing or not a supported value. allowed lists the supported values. |
400 Bad Request | platform_required | No platform: send X-Platform-Id, or use an access token authorized with your platform. |
400 Bad Request | invalid_platform | X-Platform-Id is not a UUID, or it is not a known platform. |
400 Bad Request | platform_mismatch | X-Platform-Id differs from the platform your access token was authorized for. |
400 Bad Request | unsupported_platform | Your platform isn’t set up to show this offer type. Contact Support. |
401 Unauthorized | unauthorized | The API key or access token is missing or invalid. |
{
"offers": [
{
"imageUrl": "https://example.com/offer.png",
"referralUrl": "https://example.com/discount/BRANDUO25?ref=bd_1234",
"title": "Claim 25% off",
"subtitle": "Sheet sets, pillowcases & eye masks"
}
]
}
{
"error": "invalid_offer_type",
"message": "type must be one of the offer types listed in allowed.",
"allowed": ["post-purchase"]
}
{
"error": "unauthorized",
"message": "Invalid or missing API key or access token."
}

