Vendor Portal Logout
curl --request POST \
--url https://production-api.puppetvendors.com/portal/auth/logout \
--header 'x-access-token: <api-key>'import requests
url = "https://production-api.puppetvendors.com/portal/auth/logout"
headers = {"x-access-token": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-access-token': '<api-key>'}};
fetch('https://production-api.puppetvendors.com/portal/auth/logout', 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://production-api.puppetvendors.com/portal/auth/logout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-access-token: <api-key>"
],
]);
$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://production-api.puppetvendors.com/portal/auth/logout"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-access-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://production-api.puppetvendors.com/portal/auth/logout")
.header("x-access-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://production-api.puppetvendors.com/portal/auth/logout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
response = http.request(request)
puts response.read_bodyVendor Portal Auth
Vendor Portal Logout
Invalidate the current vendor session token
POST
/
portal
/
auth
/
logout
Vendor Portal Logout
curl --request POST \
--url https://production-api.puppetvendors.com/portal/auth/logout \
--header 'x-access-token: <api-key>'import requests
url = "https://production-api.puppetvendors.com/portal/auth/logout"
headers = {"x-access-token": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-access-token': '<api-key>'}};
fetch('https://production-api.puppetvendors.com/portal/auth/logout', 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://production-api.puppetvendors.com/portal/auth/logout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-access-token: <api-key>"
],
]);
$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://production-api.puppetvendors.com/portal/auth/logout"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-access-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://production-api.puppetvendors.com/portal/auth/logout")
.header("x-access-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://production-api.puppetvendors.com/portal/auth/logout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
response = http.request(request)
puts response.read_bodyV2 Preview — This endpoint is part of the V2 API preview. Breaking changes may occur.
Overview
Log out the current vendor by invalidating their JWT token. After calling this endpoint, the token can no longer be used for authenticated requests.Use Cases
- Logout button — End the vendor’s session when they click “Sign out”
- Security cleanup — Invalidate a token after detecting suspicious activity
Headers
string
required
A valid vendor JWT.
Response
200
{
"success": true
}
Error Responses
401
{ "success": false, "error": { "message": "Invalid or expired token" } }
Example
curl -X POST "https://production-api.puppetvendors.com/portal/auth/logout" \
-H "x-access-token: YOUR_VENDOR_JWT"
Was this page helpful?
⌘I