Partners
Create partner
Create a new partner.
POST
/
v3
/
partners
Create partner
curl --request POST \
--url https://api.example.com/v3/partners \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"name": "Contoso Inc.",
"properties": {
"prop1": "Value",
"prop2": 100
},
"status": "Active",
"source": "ManuallyAdded",
"mainContact": {
"firstName": "John",
"lastName": "Doe",
"email": "john@doe.com",
"jobTitle": null,
"phoneNumber": null,
"linkedInProfileUrl": null,
"createAccount": true,
"sendInvitationEmail": null
},
"groupId": 10,
"programLevelId": null,
"onboardingStageId": null,
"partnerTypeId": null,
"payoutProvider": null,
"paypalEmail": null,
"currency": null,
"language": null
}
'import requests
url = "https://api.example.com/v3/partners"
payload = {
"name": "Contoso Inc.",
"properties": {
"prop1": "Value",
"prop2": 100
},
"status": "Active",
"source": "ManuallyAdded",
"mainContact": {
"firstName": "John",
"lastName": "Doe",
"email": "john@doe.com",
"jobTitle": None,
"phoneNumber": None,
"linkedInProfileUrl": None,
"createAccount": True,
"sendInvitationEmail": None
},
"groupId": 10,
"programLevelId": None,
"onboardingStageId": None,
"partnerTypeId": None,
"payoutProvider": None,
"paypalEmail": None,
"currency": None,
"language": None
}
headers = {"Content-Type": "application/json-patch+json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
name: 'Contoso Inc.',
properties: {prop1: 'Value', prop2: 100},
status: 'Active',
source: 'ManuallyAdded',
mainContact: {
firstName: 'John',
lastName: 'Doe',
email: 'john@doe.com',
jobTitle: null,
phoneNumber: null,
linkedInProfileUrl: null,
createAccount: true,
sendInvitationEmail: null
},
groupId: 10,
programLevelId: null,
onboardingStageId: null,
partnerTypeId: null,
payoutProvider: null,
paypalEmail: null,
currency: null,
language: null
})
};
fetch('https://api.example.com/v3/partners', 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.example.com/v3/partners",
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([
'name' => 'Contoso Inc.',
'properties' => [
'prop1' => 'Value',
'prop2' => 100
],
'status' => 'Active',
'source' => 'ManuallyAdded',
'mainContact' => [
'firstName' => 'John',
'lastName' => 'Doe',
'email' => 'john@doe.com',
'jobTitle' => null,
'phoneNumber' => null,
'linkedInProfileUrl' => null,
'createAccount' => true,
'sendInvitationEmail' => null
],
'groupId' => 10,
'programLevelId' => null,
'onboardingStageId' => null,
'partnerTypeId' => null,
'payoutProvider' => null,
'paypalEmail' => null,
'currency' => null,
'language' => null
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+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.example.com/v3/partners"
payload := strings.NewReader("{\n \"name\": \"Contoso Inc.\",\n \"properties\": {\n \"prop1\": \"Value\",\n \"prop2\": 100\n },\n \"status\": \"Active\",\n \"source\": \"ManuallyAdded\",\n \"mainContact\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john@doe.com\",\n \"jobTitle\": null,\n \"phoneNumber\": null,\n \"linkedInProfileUrl\": null,\n \"createAccount\": true,\n \"sendInvitationEmail\": null\n },\n \"groupId\": 10,\n \"programLevelId\": null,\n \"onboardingStageId\": null,\n \"partnerTypeId\": null,\n \"payoutProvider\": null,\n \"paypalEmail\": null,\n \"currency\": null,\n \"language\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json-patch+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.example.com/v3/partners")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"name\": \"Contoso Inc.\",\n \"properties\": {\n \"prop1\": \"Value\",\n \"prop2\": 100\n },\n \"status\": \"Active\",\n \"source\": \"ManuallyAdded\",\n \"mainContact\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john@doe.com\",\n \"jobTitle\": null,\n \"phoneNumber\": null,\n \"linkedInProfileUrl\": null,\n \"createAccount\": true,\n \"sendInvitationEmail\": null\n },\n \"groupId\": 10,\n \"programLevelId\": null,\n \"onboardingStageId\": null,\n \"partnerTypeId\": null,\n \"payoutProvider\": null,\n \"paypalEmail\": null,\n \"currency\": null,\n \"language\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v3/partners")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"name\": \"Contoso Inc.\",\n \"properties\": {\n \"prop1\": \"Value\",\n \"prop2\": 100\n },\n \"status\": \"Active\",\n \"source\": \"ManuallyAdded\",\n \"mainContact\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john@doe.com\",\n \"jobTitle\": null,\n \"phoneNumber\": null,\n \"linkedInProfileUrl\": null,\n \"createAccount\": true,\n \"sendInvitationEmail\": null\n },\n \"groupId\": 10,\n \"programLevelId\": null,\n \"onboardingStageId\": null,\n \"partnerTypeId\": null,\n \"payoutProvider\": null,\n \"paypalEmail\": null,\n \"currency\": null,\n \"language\": null\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"groupId": 123,
"onboardingStatus": "Unknown",
"status": "Unknown",
"source": "Unknown",
"company": {
"id": 123,
"name": "<string>",
"websiteUrls": [
"<string>"
]
},
"mainContact": {
"id": 123,
"email": "<string>",
"firstname": "<string>",
"lastname": "<string>",
"jobTitle": "<string>",
"phoneNumber": "<string>",
"linkedInProfileUrl": "<string>",
"creationDate": "2023-11-07T05:31:56Z",
"isMainContact": true
},
"onboardingStage": {
"id": 123,
"name": "<string>",
"description": "<string>",
"order": 123,
"onboardingPipelineId": 123,
"onboardingPipelineName": "<string>"
},
"onboardingStages": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"order": 123,
"onboardingPipelineId": 123,
"onboardingPipelineName": "<string>"
}
],
"levels": [
{
"programLevelId": 123,
"programLevelName": "<string>",
"programId": 123,
"programName": "<string>"
}
],
"sinceDate": "2023-11-07T05:31:56Z",
"partnerTypeId": 123,
"partnerTypeName": "<string>",
"properties": {},
"ownerUserId": 123,
"owner": {
"id": 123,
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"referralCode": "<string>",
"paypalEmail": "<string>",
"currency": "<string>",
"payoutProvider": {
"type": "Unknown",
"details": {}
},
"language": "<string>"
}{
"errorCode": "Transactions.InvalidCustomerIdentifier",
"errorMessage": "You must specify one customer identifier"
}Body
application/json-patch+jsonapplication/jsontext/jsonapplication/*+json
Show child attributes
Show child attributes
Available options:
Unknown, Active, Prospect, Rejected, Applicant, Inactive, Onboarding Available options:
Unknown, ManuallyAdded, SignupForm Show child attributes
Show child attributes
Show child attributes
Show child attributes
Deprecated. Use PayoutProvider and PayoutProvider
Response
Partner created
Available options:
Unknown, NotOnboarded, InProgress, Completed Available options:
Unknown, Active, Prospect, Rejected, Applicant, Inactive, Onboarding Available options:
Unknown, ManuallyAdded, SignupForm Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Create partner
curl --request POST \
--url https://api.example.com/v3/partners \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"name": "Contoso Inc.",
"properties": {
"prop1": "Value",
"prop2": 100
},
"status": "Active",
"source": "ManuallyAdded",
"mainContact": {
"firstName": "John",
"lastName": "Doe",
"email": "john@doe.com",
"jobTitle": null,
"phoneNumber": null,
"linkedInProfileUrl": null,
"createAccount": true,
"sendInvitationEmail": null
},
"groupId": 10,
"programLevelId": null,
"onboardingStageId": null,
"partnerTypeId": null,
"payoutProvider": null,
"paypalEmail": null,
"currency": null,
"language": null
}
'import requests
url = "https://api.example.com/v3/partners"
payload = {
"name": "Contoso Inc.",
"properties": {
"prop1": "Value",
"prop2": 100
},
"status": "Active",
"source": "ManuallyAdded",
"mainContact": {
"firstName": "John",
"lastName": "Doe",
"email": "john@doe.com",
"jobTitle": None,
"phoneNumber": None,
"linkedInProfileUrl": None,
"createAccount": True,
"sendInvitationEmail": None
},
"groupId": 10,
"programLevelId": None,
"onboardingStageId": None,
"partnerTypeId": None,
"payoutProvider": None,
"paypalEmail": None,
"currency": None,
"language": None
}
headers = {"Content-Type": "application/json-patch+json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
name: 'Contoso Inc.',
properties: {prop1: 'Value', prop2: 100},
status: 'Active',
source: 'ManuallyAdded',
mainContact: {
firstName: 'John',
lastName: 'Doe',
email: 'john@doe.com',
jobTitle: null,
phoneNumber: null,
linkedInProfileUrl: null,
createAccount: true,
sendInvitationEmail: null
},
groupId: 10,
programLevelId: null,
onboardingStageId: null,
partnerTypeId: null,
payoutProvider: null,
paypalEmail: null,
currency: null,
language: null
})
};
fetch('https://api.example.com/v3/partners', 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.example.com/v3/partners",
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([
'name' => 'Contoso Inc.',
'properties' => [
'prop1' => 'Value',
'prop2' => 100
],
'status' => 'Active',
'source' => 'ManuallyAdded',
'mainContact' => [
'firstName' => 'John',
'lastName' => 'Doe',
'email' => 'john@doe.com',
'jobTitle' => null,
'phoneNumber' => null,
'linkedInProfileUrl' => null,
'createAccount' => true,
'sendInvitationEmail' => null
],
'groupId' => 10,
'programLevelId' => null,
'onboardingStageId' => null,
'partnerTypeId' => null,
'payoutProvider' => null,
'paypalEmail' => null,
'currency' => null,
'language' => null
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+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.example.com/v3/partners"
payload := strings.NewReader("{\n \"name\": \"Contoso Inc.\",\n \"properties\": {\n \"prop1\": \"Value\",\n \"prop2\": 100\n },\n \"status\": \"Active\",\n \"source\": \"ManuallyAdded\",\n \"mainContact\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john@doe.com\",\n \"jobTitle\": null,\n \"phoneNumber\": null,\n \"linkedInProfileUrl\": null,\n \"createAccount\": true,\n \"sendInvitationEmail\": null\n },\n \"groupId\": 10,\n \"programLevelId\": null,\n \"onboardingStageId\": null,\n \"partnerTypeId\": null,\n \"payoutProvider\": null,\n \"paypalEmail\": null,\n \"currency\": null,\n \"language\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json-patch+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.example.com/v3/partners")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"name\": \"Contoso Inc.\",\n \"properties\": {\n \"prop1\": \"Value\",\n \"prop2\": 100\n },\n \"status\": \"Active\",\n \"source\": \"ManuallyAdded\",\n \"mainContact\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john@doe.com\",\n \"jobTitle\": null,\n \"phoneNumber\": null,\n \"linkedInProfileUrl\": null,\n \"createAccount\": true,\n \"sendInvitationEmail\": null\n },\n \"groupId\": 10,\n \"programLevelId\": null,\n \"onboardingStageId\": null,\n \"partnerTypeId\": null,\n \"payoutProvider\": null,\n \"paypalEmail\": null,\n \"currency\": null,\n \"language\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v3/partners")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"name\": \"Contoso Inc.\",\n \"properties\": {\n \"prop1\": \"Value\",\n \"prop2\": 100\n },\n \"status\": \"Active\",\n \"source\": \"ManuallyAdded\",\n \"mainContact\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john@doe.com\",\n \"jobTitle\": null,\n \"phoneNumber\": null,\n \"linkedInProfileUrl\": null,\n \"createAccount\": true,\n \"sendInvitationEmail\": null\n },\n \"groupId\": 10,\n \"programLevelId\": null,\n \"onboardingStageId\": null,\n \"partnerTypeId\": null,\n \"payoutProvider\": null,\n \"paypalEmail\": null,\n \"currency\": null,\n \"language\": null\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"groupId": 123,
"onboardingStatus": "Unknown",
"status": "Unknown",
"source": "Unknown",
"company": {
"id": 123,
"name": "<string>",
"websiteUrls": [
"<string>"
]
},
"mainContact": {
"id": 123,
"email": "<string>",
"firstname": "<string>",
"lastname": "<string>",
"jobTitle": "<string>",
"phoneNumber": "<string>",
"linkedInProfileUrl": "<string>",
"creationDate": "2023-11-07T05:31:56Z",
"isMainContact": true
},
"onboardingStage": {
"id": 123,
"name": "<string>",
"description": "<string>",
"order": 123,
"onboardingPipelineId": 123,
"onboardingPipelineName": "<string>"
},
"onboardingStages": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"order": 123,
"onboardingPipelineId": 123,
"onboardingPipelineName": "<string>"
}
],
"levels": [
{
"programLevelId": 123,
"programLevelName": "<string>",
"programId": 123,
"programName": "<string>"
}
],
"sinceDate": "2023-11-07T05:31:56Z",
"partnerTypeId": 123,
"partnerTypeName": "<string>",
"properties": {},
"ownerUserId": 123,
"owner": {
"id": 123,
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"referralCode": "<string>",
"paypalEmail": "<string>",
"currency": "<string>",
"payoutProvider": {
"type": "Unknown",
"details": {}
},
"language": "<string>"
}{
"errorCode": "Transactions.InvalidCustomerIdentifier",
"errorMessage": "You must specify one customer identifier"
}