Creates or updates a counterpart entity
curl --request PUT \
--url https://api.demo.fuelboss.net/v1/counterpart-entities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"counterpartCompanyIdentifier": "<string>",
"name": "<string>",
"reference": "<string>",
"isActive": true,
"email": "<string>",
"phoneNumber": "<string>"
}
'import requests
url = "https://api.demo.fuelboss.net/v1/counterpart-entities"
payload = {
"counterpartCompanyIdentifier": "<string>",
"name": "<string>",
"reference": "<string>",
"isActive": True,
"email": "<string>",
"phoneNumber": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
counterpartCompanyIdentifier: '<string>',
name: '<string>',
reference: '<string>',
isActive: true,
email: '<string>',
phoneNumber: '<string>'
})
};
fetch('https://api.demo.fuelboss.net/v1/counterpart-entities', 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.demo.fuelboss.net/v1/counterpart-entities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'counterpartCompanyIdentifier' => '<string>',
'name' => '<string>',
'reference' => '<string>',
'isActive' => true,
'email' => '<string>',
'phoneNumber' => '<string>'
]),
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.demo.fuelboss.net/v1/counterpart-entities"
payload := strings.NewReader("{\n \"counterpartCompanyIdentifier\": \"<string>\",\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"isActive\": true,\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.demo.fuelboss.net/v1/counterpart-entities")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"counterpartCompanyIdentifier\": \"<string>\",\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"isActive\": true,\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.demo.fuelboss.net/v1/counterpart-entities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"counterpartCompanyIdentifier\": \"<string>\",\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"isActive\": true,\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"reference": "<string>",
"lastChangedAtUtc": "2023-11-07T05:31:56Z"
}{
"reference": "<string>",
"lastChangedAtUtc": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"trace_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"trace_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"trace_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"trace_id": "<string>"
}Entity management
Creates or updates a counterpart entity
Creates a new or updates an existing one based on the reference
PUT
/
v1
/
counterpart-entities
Creates or updates a counterpart entity
curl --request PUT \
--url https://api.demo.fuelboss.net/v1/counterpart-entities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"counterpartCompanyIdentifier": "<string>",
"name": "<string>",
"reference": "<string>",
"isActive": true,
"email": "<string>",
"phoneNumber": "<string>"
}
'import requests
url = "https://api.demo.fuelboss.net/v1/counterpart-entities"
payload = {
"counterpartCompanyIdentifier": "<string>",
"name": "<string>",
"reference": "<string>",
"isActive": True,
"email": "<string>",
"phoneNumber": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
counterpartCompanyIdentifier: '<string>',
name: '<string>',
reference: '<string>',
isActive: true,
email: '<string>',
phoneNumber: '<string>'
})
};
fetch('https://api.demo.fuelboss.net/v1/counterpart-entities', 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.demo.fuelboss.net/v1/counterpart-entities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'counterpartCompanyIdentifier' => '<string>',
'name' => '<string>',
'reference' => '<string>',
'isActive' => true,
'email' => '<string>',
'phoneNumber' => '<string>'
]),
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.demo.fuelboss.net/v1/counterpart-entities"
payload := strings.NewReader("{\n \"counterpartCompanyIdentifier\": \"<string>\",\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"isActive\": true,\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.demo.fuelboss.net/v1/counterpart-entities")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"counterpartCompanyIdentifier\": \"<string>\",\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"isActive\": true,\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.demo.fuelboss.net/v1/counterpart-entities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"counterpartCompanyIdentifier\": \"<string>\",\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"isActive\": true,\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"reference": "<string>",
"lastChangedAtUtc": "2023-11-07T05:31:56Z"
}{
"reference": "<string>",
"lastChangedAtUtc": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"trace_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"trace_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"trace_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"trace_id": "<string>"
}Authorizations
Access token obtained from the /oauth/token endpoint using your client credentials.
Body
application/json
Request body for creating or updating a counterpart entity.
Identifier of the counterpart company (from Get Companies).
Counterpart entity name.
Your unique reference for this counterpart entity.
Whether this counterpart entity is active. Inactive counterpart entities cannot be referenced from nominations.
Contact email address for the counterpart entity.
Contact phone number for the counterpart entity.
⌘I