Get the team’s API usage
curl --request GET \
--url https://api.shoplist.co/v1/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.shoplist.co/v1/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shoplist.co/v1/usage', 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.shoplist.co/v1/usage",
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.shoplist.co/v1/usage"
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.shoplist.co/v1/usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoplist.co/v1/usage")
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{
"data": {
"object": "usage",
"period": {
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z"
},
"unique_stores": {
"limit": 4503599627370495,
"used": 4503599627370495,
"remaining": 4503599627370495
}
}
}{
"type": "https://shoplist.co/docs/errors#unauthenticated",
"title": "Unauthenticated",
"status": 401,
"detail": "<string>",
"code": "unauthenticated",
"request_id": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"type": "https://shoplist.co/docs/errors#insufficient_scope",
"title": "Insufficient scope",
"status": 403,
"detail": "<string>",
"code": "insufficient_scope",
"request_id": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"type": "https://shoplist.co/docs/errors#not_found",
"title": "Not found",
"status": 404,
"detail": "<string>",
"code": "not_found",
"request_id": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"type": "https://shoplist.co/docs/errors#rate_limited",
"title": "Rate limit exceeded",
"status": 429,
"detail": "<string>",
"code": "rate_limited",
"request_id": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"type": "https://shoplist.co/docs/errors#internal_error",
"title": "Internal error",
"status": 500,
"detail": "<string>",
"code": "internal_error",
"request_id": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"type": "https://shoplist.co/docs/errors#service_unavailable",
"title": "Service unavailable",
"status": 503,
"detail": "<string>",
"code": "service_unavailable",
"request_id": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}Account
Get the team’s API usage
Returns the current billing period and the team’s unique-store allowance and usage.
GET
/
v1
/
usage
Get the team’s API usage
curl --request GET \
--url https://api.shoplist.co/v1/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.shoplist.co/v1/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shoplist.co/v1/usage', 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.shoplist.co/v1/usage",
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.shoplist.co/v1/usage"
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.shoplist.co/v1/usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoplist.co/v1/usage")
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{
"data": {
"object": "usage",
"period": {
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z"
},
"unique_stores": {
"limit": 4503599627370495,
"used": 4503599627370495,
"remaining": 4503599627370495
}
}
}{
"type": "https://shoplist.co/docs/errors#unauthenticated",
"title": "Unauthenticated",
"status": 401,
"detail": "<string>",
"code": "unauthenticated",
"request_id": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"type": "https://shoplist.co/docs/errors#insufficient_scope",
"title": "Insufficient scope",
"status": 403,
"detail": "<string>",
"code": "insufficient_scope",
"request_id": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"type": "https://shoplist.co/docs/errors#not_found",
"title": "Not found",
"status": 404,
"detail": "<string>",
"code": "not_found",
"request_id": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"type": "https://shoplist.co/docs/errors#rate_limited",
"title": "Rate limit exceeded",
"status": 429,
"detail": "<string>",
"code": "rate_limited",
"request_id": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"type": "https://shoplist.co/docs/errors#internal_error",
"title": "Internal error",
"status": 500,
"detail": "<string>",
"code": "internal_error",
"request_id": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"type": "https://shoplist.co/docs/errors#service_unavailable",
"title": "Service unavailable",
"status": 503,
"detail": "<string>",
"code": "service_unavailable",
"request_id": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}