curl --request PUT \
--url https://api.topsort.com/public/v1/billing-service/vendor-billing-contact \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"billingContactId": "<string>",
"vendorId": "<string>"
}
'import requests
url = "https://api.topsort.com/public/v1/billing-service/vendor-billing-contact"
payload = {
"billingContactId": "<string>",
"vendorId": "<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({billingContactId: '<string>', vendorId: '<string>'})
};
fetch('https://api.topsort.com/public/v1/billing-service/vendor-billing-contact', 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.topsort.com/public/v1/billing-service/vendor-billing-contact",
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([
'billingContactId' => '<string>',
'vendorId' => '<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.topsort.com/public/v1/billing-service/vendor-billing-contact"
payload := strings.NewReader("{\n \"billingContactId\": \"<string>\",\n \"vendorId\": \"<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.topsort.com/public/v1/billing-service/vendor-billing-contact")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"billingContactId\": \"<string>\",\n \"vendorId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.topsort.com/public/v1/billing-service/vendor-billing-contact")
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 \"billingContactId\": \"<string>\",\n \"vendorId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Upsert Vendor Billing Contact
Link a billing contact to a vendor.
Only contacts linked to a vendor appear in that vendor’s campaign forms in the Topsort UI, so this is the step that makes a contact selectable. In the Digital Services Act (DSA) setup, it comes after Upsert Billing Contact and before the contact is assigned to campaigns.
A contact can be linked to many vendors, and a vendor can have many contacts.
vendorId is your vendor ID, the same one you send in your catalog. Linking a
contact that is already linked has no effect.
Returns 404 if the billing contact or the vendor doesn’t exist.
See the DSA setup guide.
curl --request PUT \
--url https://api.topsort.com/public/v1/billing-service/vendor-billing-contact \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"billingContactId": "<string>",
"vendorId": "<string>"
}
'import requests
url = "https://api.topsort.com/public/v1/billing-service/vendor-billing-contact"
payload = {
"billingContactId": "<string>",
"vendorId": "<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({billingContactId: '<string>', vendorId: '<string>'})
};
fetch('https://api.topsort.com/public/v1/billing-service/vendor-billing-contact', 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.topsort.com/public/v1/billing-service/vendor-billing-contact",
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([
'billingContactId' => '<string>',
'vendorId' => '<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.topsort.com/public/v1/billing-service/vendor-billing-contact"
payload := strings.NewReader("{\n \"billingContactId\": \"<string>\",\n \"vendorId\": \"<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.topsort.com/public/v1/billing-service/vendor-billing-contact")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"billingContactId\": \"<string>\",\n \"vendorId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.topsort.com/public/v1/billing-service/vendor-billing-contact")
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 \"billingContactId\": \"<string>\",\n \"vendorId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Autorizações
A valid API key generated in Topsort's UI. Use the TSE API key if calling auctions or events API, otherwise use the TSC API key.
Corpo
Resposta
Successful Response
Esta página foi útil?