curl --request GET \
--url https://api.spacebring.com/subscriptions/v1 \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.spacebring.com/subscriptions/v1"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.spacebring.com/subscriptions/v1', 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.spacebring.com/subscriptions/v1",
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: Basic <encoded-value>"
],
]);
$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.spacebring.com/subscriptions/v1"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.spacebring.com/subscriptions/v1")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spacebring.com/subscriptions/v1")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"subscriptions": [
{
"addPendingItemsToInvoice": true,
"advanceInvoicing": {
"days": 123,
"type": "days"
},
"assignments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": {
"id": "<string>",
"title": "<string>",
"type": "<string>",
"coverUrl": "<string>"
},
"title": "<string>",
"entire": true,
"quantity": 123
}
],
"billingCycleAnchor": "any",
"createDate": "2023-11-07T05:31:56Z",
"credits": 123,
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "company",
"logo": {
"key": "<string>",
"url": "<string>"
},
"publicLogoUrl": "<string>",
"title": "<string>",
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>",
"name": "<string>",
"photoUrl": "<string>",
"surname": "<string>"
}
},
"customerRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dayPasses": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"autoUpdateFromProduct": true,
"createDate": "2023-11-07T05:31:56Z",
"credits": 123,
"customEnd": true,
"customStart": true,
"customTax": {
"enabled": true,
"rate": 123
},
"dayPasses": 123,
"endFixed": true,
"grantedDiscounts": [
{
"coupon": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amountOff": 123,
"currencyCode": "<string>",
"enabledForCredits": true,
"limitedItems": {
"enabled": true,
"values": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "roomBookings",
"title": "<string>"
}
]
},
"limitedRedemption": {
"enabled": true,
"usage": 123,
"value": 123
},
"percentOff": 123,
"productTypes": [
"roomBookings"
]
}
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 123,
"quantity": 123,
"setupFee": 123,
"startFixed": true,
"type": "oneOff",
"avigilonAltaGroupRef": 123,
"brivoGroupRef": 123,
"commitmentCycles": 123,
"commitmentEndDate": "2023-11-07T05:31:56Z",
"couponRef": "<string>",
"discounts": {
"creditPackages": 123,
"desks": 123,
"equipment": 123,
"events": 123,
"rooms": 123,
"shop": 123
},
"endDate": "2023-11-07T05:31:56Z",
"entire": true,
"exclusiveAccess": {
"benefitRefs": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"resourceRefs": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"ezeepBlueGroupRef": "<string>",
"kisiGroupRef": 123,
"optionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"resourceRef": "<string>"
},
"planRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"type": "<string>",
"coverUrl": "<string>",
"imageUrl": "<string>"
},
"resourceRef": "<string>",
"saltoksAccessGroupRef": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"tapkeyGroupRef": "<string>",
"tier": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"tierRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"unifiAccessGroupRef": "<string>"
}
],
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"networkRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payWithInvoice": {
"creditPackages": true,
"desks": true,
"events": true,
"rooms": true,
"shop": true,
"equipment": true,
"parking": true
},
"period": "day",
"price": 123,
"startDate": "2023-11-07T05:31:56Z",
"startFixed": true,
"status": "active",
"subscriptionType": "company",
"timezoneId": "<string>",
"company": {
"createDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"logo": {
"key": "<string>",
"url": "<string>"
},
"metadata": {},
"notes": "<string>",
"publicLogoUrl": "<string>"
},
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contract": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>"
},
"currentInterval": {
"endDate": "2023-11-07T05:31:56Z",
"startDate": "2023-11-07T05:31:56Z",
"futureIntervalItemsCreated": true
},
"deleteDate": "2023-11-07T05:31:56Z",
"discounts": {
"creditPackages": 123,
"desks": 123,
"equipment": 123,
"events": 123,
"rooms": 123,
"shop": 123
},
"endDate": "2023-11-07T05:31:56Z",
"membershipRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"nextInterval": {
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z"
},
"pausePaymentCollection": {
"behavior": "draft",
"createDate": "2023-11-07T05:31:56Z",
"resumesAt": "2023-11-07T05:31:56Z"
},
"payment": {
"status": "<string>",
"request": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>"
}
},
"purchaseDate": "2023-11-07T05:31:56Z",
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"about": "<string>",
"email": "<string>",
"name": "<string>",
"phoneNumber": "<string>",
"photoUrl": "<string>",
"surname": "<string>"
},
"userCreator": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"about": "<string>",
"email": "<string>",
"name": "<string>",
"phoneNumber": "<string>",
"photoUrl": "<string>",
"surname": "<string>"
},
"userRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"nextPageToken": "<string>",
"searchQueryNext": "<string>"
}{
"message": "<string>",
"type": "<string>"
}Retrieve subscriptions
Retrieve subscriptions.
OAuth
Required scopes:subscriptions.readonly or subscriptionscurl --request GET \
--url https://api.spacebring.com/subscriptions/v1 \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.spacebring.com/subscriptions/v1"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.spacebring.com/subscriptions/v1', 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.spacebring.com/subscriptions/v1",
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: Basic <encoded-value>"
],
]);
$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.spacebring.com/subscriptions/v1"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.spacebring.com/subscriptions/v1")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spacebring.com/subscriptions/v1")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"subscriptions": [
{
"addPendingItemsToInvoice": true,
"advanceInvoicing": {
"days": 123,
"type": "days"
},
"assignments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": {
"id": "<string>",
"title": "<string>",
"type": "<string>",
"coverUrl": "<string>"
},
"title": "<string>",
"entire": true,
"quantity": 123
}
],
"billingCycleAnchor": "any",
"createDate": "2023-11-07T05:31:56Z",
"credits": 123,
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "company",
"logo": {
"key": "<string>",
"url": "<string>"
},
"publicLogoUrl": "<string>",
"title": "<string>",
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>",
"name": "<string>",
"photoUrl": "<string>",
"surname": "<string>"
}
},
"customerRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dayPasses": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"autoUpdateFromProduct": true,
"createDate": "2023-11-07T05:31:56Z",
"credits": 123,
"customEnd": true,
"customStart": true,
"customTax": {
"enabled": true,
"rate": 123
},
"dayPasses": 123,
"endFixed": true,
"grantedDiscounts": [
{
"coupon": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amountOff": 123,
"currencyCode": "<string>",
"enabledForCredits": true,
"limitedItems": {
"enabled": true,
"values": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "roomBookings",
"title": "<string>"
}
]
},
"limitedRedemption": {
"enabled": true,
"usage": 123,
"value": 123
},
"percentOff": 123,
"productTypes": [
"roomBookings"
]
}
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 123,
"quantity": 123,
"setupFee": 123,
"startFixed": true,
"type": "oneOff",
"avigilonAltaGroupRef": 123,
"brivoGroupRef": 123,
"commitmentCycles": 123,
"commitmentEndDate": "2023-11-07T05:31:56Z",
"couponRef": "<string>",
"discounts": {
"creditPackages": 123,
"desks": 123,
"equipment": 123,
"events": 123,
"rooms": 123,
"shop": 123
},
"endDate": "2023-11-07T05:31:56Z",
"entire": true,
"exclusiveAccess": {
"benefitRefs": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"resourceRefs": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"ezeepBlueGroupRef": "<string>",
"kisiGroupRef": 123,
"optionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"resourceRef": "<string>"
},
"planRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"type": "<string>",
"coverUrl": "<string>",
"imageUrl": "<string>"
},
"resourceRef": "<string>",
"saltoksAccessGroupRef": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"tapkeyGroupRef": "<string>",
"tier": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"tierRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"unifiAccessGroupRef": "<string>"
}
],
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"networkRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payWithInvoice": {
"creditPackages": true,
"desks": true,
"events": true,
"rooms": true,
"shop": true,
"equipment": true,
"parking": true
},
"period": "day",
"price": 123,
"startDate": "2023-11-07T05:31:56Z",
"startFixed": true,
"status": "active",
"subscriptionType": "company",
"timezoneId": "<string>",
"company": {
"createDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"logo": {
"key": "<string>",
"url": "<string>"
},
"metadata": {},
"notes": "<string>",
"publicLogoUrl": "<string>"
},
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contract": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>"
},
"currentInterval": {
"endDate": "2023-11-07T05:31:56Z",
"startDate": "2023-11-07T05:31:56Z",
"futureIntervalItemsCreated": true
},
"deleteDate": "2023-11-07T05:31:56Z",
"discounts": {
"creditPackages": 123,
"desks": 123,
"equipment": 123,
"events": 123,
"rooms": 123,
"shop": 123
},
"endDate": "2023-11-07T05:31:56Z",
"membershipRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"nextInterval": {
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z"
},
"pausePaymentCollection": {
"behavior": "draft",
"createDate": "2023-11-07T05:31:56Z",
"resumesAt": "2023-11-07T05:31:56Z"
},
"payment": {
"status": "<string>",
"request": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>"
}
},
"purchaseDate": "2023-11-07T05:31:56Z",
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"about": "<string>",
"email": "<string>",
"name": "<string>",
"phoneNumber": "<string>",
"photoUrl": "<string>",
"surname": "<string>"
},
"userCreator": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"about": "<string>",
"email": "<string>",
"name": "<string>",
"phoneNumber": "<string>",
"photoUrl": "<string>",
"surname": "<string>"
},
"userRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"nextPageToken": "<string>",
"searchQueryNext": "<string>"
}{
"message": "<string>",
"type": "<string>"
}Authorizations
See our authentication documentation for how to authorize your requests
Headers
The id of the network. Required when using bearer token authentication
Query Parameters
Filter subscriptions created on or after this date (ISO 8601). Use with createDate[lte] for a range.
Filter subscriptions created on or before this date (ISO 8601). Use with createDate[gte] for a range.
UUID of the customer whose subscriptions to list.
Maximum number of subscriptions per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100.
1 <= x <= 100UUID of the location whose subscriptions to list. Omit locationRef and customerRef to list subscriptions across every location of the network, grouped by location.
Pagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page.
Sort order as field:direction, where field is startDate, endDate, createDate or renewDate and direction is asc or desc, such as startDate:asc. Applies to a location's subscriptions and needs locationRef. Defaults to createDate:desc.
UUID of the plan to filter subscriptions by. Applies to a location's or the network's subscriptions.
Filter by status: 'active' started and not ended or canceled, 'scheduled' starts in the future, 'incomplete' setup not finished (such as an unsigned contract or an unpaid purchase), 'incompleteExpired' setup was never finished (the contract was declined or the payment canceled), 'canceled' canceled or ended. Defaults to active, scheduled and incomplete. Comma-separated, one or more of: active, scheduled, incomplete, incompleteExpired, canceled.