Renew device credentials
curl --request POST \
--url https://api.exowpee.com/v1/catalog/pos-sync/instances/{instance}/rotate-credentials \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/pos-sync/instances/{instance}/rotate-credentials"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/pos-sync/instances/{instance}/rotate-credentials', 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.exowpee.com/v1/catalog/pos-sync/instances/{instance}/rotate-credentials",
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>"
],
]);
$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.exowpee.com/v1/catalog/pos-sync/instances/{instance}/rotate-credentials"
req, _ := http.NewRequest("POST", url, nil)
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.exowpee.com/v1/catalog/pos-sync/instances/{instance}/rotate-credentials")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/pos-sync/instances/{instance}/rotate-credentials")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"organization_id": "<string>",
"computer_id": "<string>",
"name": "<string>",
"status": "<string>",
"connection": {},
"api_token": "<string>"
}
}Connect offline POS devices
Renew device credentials
A POS device that was asked to rotate receives new sync credentials and the old ones stop working.
POST
/
catalog
/
pos-sync
/
instances
/
{instance}
/
rotate-credentials
Renew device credentials
curl --request POST \
--url https://api.exowpee.com/v1/catalog/pos-sync/instances/{instance}/rotate-credentials \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/pos-sync/instances/{instance}/rotate-credentials"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/pos-sync/instances/{instance}/rotate-credentials', 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.exowpee.com/v1/catalog/pos-sync/instances/{instance}/rotate-credentials",
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>"
],
]);
$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.exowpee.com/v1/catalog/pos-sync/instances/{instance}/rotate-credentials"
req, _ := http.NewRequest("POST", url, nil)
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.exowpee.com/v1/catalog/pos-sync/instances/{instance}/rotate-credentials")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/pos-sync/instances/{instance}/rotate-credentials")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"organization_id": "<string>",
"computer_id": "<string>",
"name": "<string>",
"status": "<string>",
"connection": {},
"api_token": "<string>"
}
}POS sync device
Cannot be undone
For: Integrator
Conditions
- The caller must present the device’s own access token as a bearer token, and the token must match the device in the URL; otherwise the call is refused with 401.
- The device must be active; a revoked device is refused with 401.
- A rotation must have been requested by a manager first; otherwise the call is refused with 409.
- The organization’s sync topic must be provisioned.
- The route is rate limited.
- Issues a new broker secret, returned only in this response; the previous secret stops working.
- Records the rotation time, clears the rotation request and removes the stored credentials replay bundle. The API token stays valid.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the POS sync device (27-character KSUID).
Response
200 - application/json
PosSyncInstanceCredentialsResource
Items of this page.
Show child attributes
Show child attributes