过期结账会话
curl --request POST \
--url https://{api}.subotiz.com/api/v1/session/{session_id}/expire \
--header 'Authorization: Bearer <token>' \
--header 'Request-Id: <request-id>'const options = {
method: 'POST',
headers: {'Request-Id': '<request-id>', Authorization: 'Bearer <token>'}
};
fetch('https://{api}.subotiz.com/api/v1/session/{session_id}/expire', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{api}.subotiz.com/api/v1/session/{session_id}/expire"
headers = {
"Request-Id": "<request-id>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{api}.subotiz.com/api/v1/session/{session_id}/expire",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Request-Id: <request-id>"
],
]);
$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://{api}.subotiz.com/api/v1/session/{session_id}/expire"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Request-Id", "<request-id>")
req.Header.Add("Authorization", "Bearer <token>")
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}.subotiz.com/api/v1/session/{session_id}/expire")
.header("Request-Id", "<request-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api}.subotiz.com/api/v1/session/{session_id}/expire")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Request-Id"] = '<request-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "<string>",
"message": "<string>",
"data": {
"id": "<string>",
"status": "<string>"
}
}结账会话
过期结账会话
主动使结账会话过期
POST
/
api
/
v1
/
session
/
{session_id}
/
expire
过期结账会话
curl --request POST \
--url https://{api}.subotiz.com/api/v1/session/{session_id}/expire \
--header 'Authorization: Bearer <token>' \
--header 'Request-Id: <request-id>'const options = {
method: 'POST',
headers: {'Request-Id': '<request-id>', Authorization: 'Bearer <token>'}
};
fetch('https://{api}.subotiz.com/api/v1/session/{session_id}/expire', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{api}.subotiz.com/api/v1/session/{session_id}/expire"
headers = {
"Request-Id": "<request-id>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{api}.subotiz.com/api/v1/session/{session_id}/expire",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Request-Id: <request-id>"
],
]);
$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://{api}.subotiz.com/api/v1/session/{session_id}/expire"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Request-Id", "<request-id>")
req.Header.Add("Authorization", "Bearer <token>")
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}.subotiz.com/api/v1/session/{session_id}/expire")
.header("Request-Id", "<request-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api}.subotiz.com/api/v1/session/{session_id}/expire")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Request-Id"] = '<request-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "<string>",
"message": "<string>",
"data": {
"id": "<string>",
"status": "<string>"
}
}主动使结账会话过期
授权
Bearer API Key 鉴权。格式:Authorization: Bearer {your_api_key}
请求头
请求的唯一标识符
路径参数
会话ID值
此页面对您有帮助吗?
⌘I