Partnerships
Terminate Partnership
Ends a partnership for good. The partner is removed from your program, loses access to their referral link and is notified by email. A termination_reason is required; it is stored on the partnership and returned in the termination_reason attribute. Any pending, accepted or declined partnership can be terminated. Termination cannot be undone through the API, so use the decline flow in the dashboard if you only want to turn down a request.
POST
/
v1
/
partnerships
/
{id}
/
terminate
Terminate Partnership
curl --request POST \
--url https://api.getreditus.com/api/v1/partnerships/{id}/terminate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"termination_reason": "Partner violated the program terms"
}
'import requests
url = "https://api.getreditus.com/api/v1/partnerships/{id}/terminate"
payload = { "termination_reason": "Partner violated the program terms" }
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({termination_reason: 'Partner violated the program terms'})
};
fetch('https://api.getreditus.com/api/v1/partnerships/{id}/terminate', 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}/terminate",
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([
'termination_reason' => 'Partner violated the program terms'
]),
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://api.getreditus.com/api/v1/partnerships/{id}/terminate"
payload := strings.NewReader("{\n \"termination_reason\": \"Partner violated the program terms\"\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://api.getreditus.com/api/v1/partnerships/{id}/terminate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"termination_reason\": \"Partner violated the program terms\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getreditus.com/api/v1/partnerships/{id}/terminate")
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 \"termination_reason\": \"Partner violated the program terms\"\n}"
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": "Bad Request",
"details": "termination_reason is required"
}
]
}{
"errors": [
{
"title": "Not Found",
"details": "Partnership not found"
}
]
}{
"errors": [
{
"title": "Unprocessable entity",
"details": "Partnership in state 'accepted' cannot be accepted"
}
]
}Authorizations
Body
application/json
⌘I
Terminate Partnership
curl --request POST \
--url https://api.getreditus.com/api/v1/partnerships/{id}/terminate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"termination_reason": "Partner violated the program terms"
}
'import requests
url = "https://api.getreditus.com/api/v1/partnerships/{id}/terminate"
payload = { "termination_reason": "Partner violated the program terms" }
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({termination_reason: 'Partner violated the program terms'})
};
fetch('https://api.getreditus.com/api/v1/partnerships/{id}/terminate', 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}/terminate",
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([
'termination_reason' => 'Partner violated the program terms'
]),
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://api.getreditus.com/api/v1/partnerships/{id}/terminate"
payload := strings.NewReader("{\n \"termination_reason\": \"Partner violated the program terms\"\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://api.getreditus.com/api/v1/partnerships/{id}/terminate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"termination_reason\": \"Partner violated the program terms\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getreditus.com/api/v1/partnerships/{id}/terminate")
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 \"termination_reason\": \"Partner violated the program terms\"\n}"
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": "Bad Request",
"details": "termination_reason is required"
}
]
}{
"errors": [
{
"title": "Not Found",
"details": "Partnership not found"
}
]
}{
"errors": [
{
"title": "Unprocessable entity",
"details": "Partnership in state 'accepted' cannot be accepted"
}
]
}