cURL
curl --request PUT \
--url 'https://api.branduo.io/v1/platform/brands/northwind-goods.myshopify.com/campaigns/post-purchase' \
--header 'X-Api-Key: YOUR_PLATFORM_KEY' \
--header 'Content-Type: application/json' \
--data '{ "active": false }'
const response = await fetch(
"https://api.branduo.io/v1/platform/brands/northwind-goods.myshopify.com/campaigns/post-purchase",
{
method: "PUT",
headers: {
"X-Api-Key": "YOUR_PLATFORM_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({ active: false }),
},
);
const placement = await response.json();
import requests
response = requests.put(
"https://api.branduo.io/v1/platform/brands/northwind-goods.myshopify.com/campaigns/post-purchase",
headers={"X-Api-Key": "YOUR_PLATFORM_KEY"},
json={"active": False},
)
placement = response.json()
{
"shop": "northwind-goods.myshopify.com",
"type": "post-purchase",
"placementOn": false,
"live": false
}
{
"error": "type_not_served",
"message": "This platform does not serve that campaign type."
}
Partner API
Set placement
Turn a merchant’s Branduo placement on your platform off or on, for one offer type.
PUT
/
platform
/
brands
/
{domain}
/
campaigns
/
{type}
cURL
curl --request PUT \
--url 'https://api.branduo.io/v1/platform/brands/northwind-goods.myshopify.com/campaigns/post-purchase' \
--header 'X-Api-Key: YOUR_PLATFORM_KEY' \
--header 'Content-Type: application/json' \
--data '{ "active": false }'
const response = await fetch(
"https://api.branduo.io/v1/platform/brands/northwind-goods.myshopify.com/campaigns/post-purchase",
{
method: "PUT",
headers: {
"X-Api-Key": "YOUR_PLATFORM_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({ active: false }),
},
);
const placement = await response.json();
import requests
response = requests.put(
"https://api.branduo.io/v1/platform/brands/northwind-goods.myshopify.com/campaigns/post-purchase",
headers={"X-Api-Key": "YOUR_PLATFORM_KEY"},
json={"active": False},
)
placement = response.json()
{
"shop": "northwind-goods.myshopify.com",
"type": "post-purchase",
"placementOn": false,
"live": false
}
{
"error": "type_not_served",
"message": "This platform does not serve that campaign type."
}
Turns the merchant’s placement for one offer type on your platform off or on. Call it when the merchant turns your Branduo placement off or removes your app (
false), and when it’s back (true).
- Off pauses all of the merchant’s campaigns of that type on your platform. Nothing is deleted, and their results are kept.
- On resumes them. For an offer type you started serving after the merchant approved,
truealso starts their campaign of that type. - It never creates an approval, and it never touches a merchant who hasn’t approved you.
cURL
curl --request PUT \
--url 'https://api.branduo.io/v1/platform/brands/northwind-goods.myshopify.com/campaigns/post-purchase' \
--header 'X-Api-Key: YOUR_PLATFORM_KEY' \
--header 'Content-Type: application/json' \
--data '{ "active": false }'
const response = await fetch(
"https://api.branduo.io/v1/platform/brands/northwind-goods.myshopify.com/campaigns/post-purchase",
{
method: "PUT",
headers: {
"X-Api-Key": "YOUR_PLATFORM_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({ active: false }),
},
);
const placement = await response.json();
import requests
response = requests.put(
"https://api.branduo.io/v1/platform/brands/northwind-goods.myshopify.com/campaigns/post-purchase",
headers={"X-Api-Key": "YOUR_PLATFORM_KEY"},
json={"active": False},
)
placement = response.json()
Path parameters
The offer type key, for example
post-purchase. It must be a type your
platform serves.Request body
{ "active": false }
Response
Whether the merchant’s campaign of this type is live on your platform now.
Turning placement on doesn’t make it live if something else holds it back
(for example, usage billing is off). Get a
brand says why in
pausedReason.Errors
| Status | error | Cause |
|---|---|---|
400 | invalid_request | The body isn’t { "active": true } or { "active": false }, or domain is not a store hostname. |
400 | type_not_served | Your platform doesn’t serve this offer type. |
401 | unauthorized | The platform key is missing or invalid. |
403 | not_approved | The merchant hasn’t approved your platform. |
403 | platform_inactive | Your platform isn’t active on Branduo. |
{
"shop": "northwind-goods.myshopify.com",
"type": "post-purchase",
"placementOn": false,
"live": false
}
{
"error": "type_not_served",
"message": "This platform does not serve that campaign type."
}

