Partnerships
Accept Partnership
Accepts a pending affiliate request, so the partner joins your program and can start referring. This triggers the same notifications as accepting the request in the Reditus dashboard: the partner receives your welcome email (or your custom partnership-started emails, if enabled) and your configured Slack, HubSpot and webhook integrations are notified. Only pending partnerships can be accepted; declined or terminated ones cannot be accepted through the API.
POST
/
v1
/
partnerships
/
{id}
/
accept
Accept Partnership
curl --request POST \
--url https://api.getreditus.com/api/v1/partnerships/{id}/accept \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getreditus.com/api/v1/partnerships/{id}/accept"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getreditus.com/api/v1/partnerships/{id}/accept', 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://api.getreditus.com/api/v1/partnerships/{id}/accept",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://api.getreditus.com/api/v1/partnerships/{id}/accept"
req, _ := http.NewRequest("POST", 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.post("https://api.getreditus.com/api/v1/partnerships/{id}/accept")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getreditus.com/api/v1/partnerships/{id}/accept")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "<string>",
"attributes": {
"state": "<string>",
"termination_reason": "<string>",
"competitor_slugs": [
"<string>"
],
"created_by": "<string>",
"state_set_at": 123,
"created_at": 123,
"updated_at": 123,
"referral_link": "<string>"
},
"relationships": {
"partner": {
"data": {
"id": "<string>",
"type": "<string>"
}
}
}
}
}{
"errors": [
{
"title": "Not Found",
"details": "Partnership not found"
}
]
}{
"errors": [
{
"title": "Unprocessable entity",
"details": "Partnership in state 'accepted' cannot be accepted"
}
]
}⌘I
Accept Partnership
curl --request POST \
--url https://api.getreditus.com/api/v1/partnerships/{id}/accept \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getreditus.com/api/v1/partnerships/{id}/accept"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getreditus.com/api/v1/partnerships/{id}/accept', 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://api.getreditus.com/api/v1/partnerships/{id}/accept",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://api.getreditus.com/api/v1/partnerships/{id}/accept"
req, _ := http.NewRequest("POST", 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.post("https://api.getreditus.com/api/v1/partnerships/{id}/accept")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getreditus.com/api/v1/partnerships/{id}/accept")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "<string>",
"attributes": {
"state": "<string>",
"termination_reason": "<string>",
"competitor_slugs": [
"<string>"
],
"created_by": "<string>",
"state_set_at": 123,
"created_at": 123,
"updated_at": 123,
"referral_link": "<string>"
},
"relationships": {
"partner": {
"data": {
"id": "<string>",
"type": "<string>"
}
}
}
}
}{
"errors": [
{
"title": "Not Found",
"details": "Partnership not found"
}
]
}{
"errors": [
{
"title": "Unprocessable entity",
"details": "Partnership in state 'accepted' cannot be accepted"
}
]
}