List role pages
curl --request GET \
--url https://api.salesive.com/api/v1/roles/pages \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.salesive.com/api/v1/roles/pages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.salesive.com/api/v1/roles/pages', 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.salesive.com/api/v1/roles/pages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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.salesive.com/api/v1/roles/pages"
req, _ := http.NewRequest("GET", 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.get("https://api.salesive.com/api/v1/roles/pages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/roles/pages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"message": "Role pages retrieved",
"data": {
"pages": [
{
"id": "overview",
"name": "Overview",
"required": true
},
{
"id": "dashboard",
"name": "Dashboard"
},
{
"id": "orders",
"name": "Orders",
"shopTypes": [
"ecommerce",
"restaurant",
"business"
]
},
{
"id": "inventory",
"name": "Inventory",
"shopTypes": [
"ecommerce"
]
}
]
}
}{
"status": 401,
"success": false,
"message": "Authentication required",
"data": null
}{
"status": 403,
"success": false,
"message": "Insufficient scope",
"data": null
}Roles
List role pages
Retrieve the catalog of role pages available for the store’s type. Requires the READ_ROLES scope.
GET
/
roles
/
pages
List role pages
curl --request GET \
--url https://api.salesive.com/api/v1/roles/pages \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.salesive.com/api/v1/roles/pages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.salesive.com/api/v1/roles/pages', 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.salesive.com/api/v1/roles/pages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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.salesive.com/api/v1/roles/pages"
req, _ := http.NewRequest("GET", 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.get("https://api.salesive.com/api/v1/roles/pages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/roles/pages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"message": "Role pages retrieved",
"data": {
"pages": [
{
"id": "overview",
"name": "Overview",
"required": true
},
{
"id": "dashboard",
"name": "Dashboard"
},
{
"id": "orders",
"name": "Orders",
"shopTypes": [
"ecommerce",
"restaurant",
"business"
]
},
{
"id": "inventory",
"name": "Inventory",
"shopTypes": [
"ecommerce"
]
}
]
}
}{
"status": 401,
"success": false,
"message": "Authentication required",
"data": null
}{
"status": 403,
"success": false,
"message": "Insufficient scope",
"data": null
}Returns the catalog of pages a role can grant access to for the store’s type; roles are read-only for apps. The store is bound to your app token server-side — never send a shop id.
Authorizations
Installed-app access token (prefix app_), issued by the OAuth install flow. The store is bound to the token server-side — never send a shop id.
Response
Catalog of role pages for the store type.
Was this page helpful?
⌘I

