Get all subscriptions
curl --request GET \
--url https://prod01.copilot.fabric.inc/data-subscription/v1/subscriptions \
--header 'Authorization: Bearer <token>'import requests
url = "https://prod01.copilot.fabric.inc/data-subscription/v1/subscriptions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://prod01.copilot.fabric.inc/data-subscription/v1/subscriptions', 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://prod01.copilot.fabric.inc/data-subscription/v1/subscriptions",
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://prod01.copilot.fabric.inc/data-subscription/v1/subscriptions"
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://prod01.copilot.fabric.inc/data-subscription/v1/subscriptions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod01.copilot.fabric.inc/data-subscription/v1/subscriptions")
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{
"responseStatus": "OK",
"message": "Request processed successfully",
"data": {
"subscriptions": [
{
"id": "6256610bc312410009b7390b",
"customer": {
"id": "62cffd65e8d7eb868c6a29d6",
"customerReferenceId": "12345",
"locale": "en_US",
"email": "customer@example.com",
"contactNumber": "+923333709568",
"firstName": "Pat",
"middleName": "E",
"lastName": "Kake",
"segment": [
"employee"
],
"employeeId": "345",
"communicationPreference": {
"email": true,
"sms": true
},
"status": "ACTIVE",
"createdAt": "2021-10-12T21:35:05.756Z",
"updatedAt": "2021-10-14T05:40:55.997Z"
},
"item": {
"id": 1000000006,
"sku": "MOBO-X570",
"quantity": 1,
"itemPrice": {
"price": 100,
"currencyCode": "USD"
},
"weight": 10,
"weightUnit": "lb",
"title": "Vitamin",
"description": "Vitamin C",
"tax": {
"taxCode": "FR020000",
"taxAmount": 10,
"currencyCode": "USD"
}
},
"plan": {
"frequency": 30,
"frequencyType": "Daily",
"id": "1001"
},
"offer": {
"id": "SUB-E10717",
"source": "PDP"
},
"shipping": {
"shipmentCarrier": "USPS",
"shipmentMethod": "Ground",
"shipmentInstructions": "Please leave the package in the box",
"taxCode": "SHP020000",
"shippingAmount": 10,
"taxAmount": 1,
"currencyCode": "USD"
},
"expiry": {
"expiryDate": "2022-07-18T09:16:11.437Z",
"billingCycles": 2
},
"shipTo": {
"name": {
"firstName": "Pat",
"lastName": "Kake",
"middleName": "E"
},
"streetAddress": {
"street1": "123 Main St",
"street2": "Suite 100"
},
"city": "Boston",
"state": "MA",
"postalCode": "02127",
"country": "US",
"phone": {
"number": "5555551234",
"kind": "home"
}
},
"billTo": {
"name": {
"firstName": "Pat",
"lastName": "Kake",
"middleName": "E"
},
"streetAddress": {
"street1": "123 Main St",
"street2": "Suite 100"
},
"city": "Boston",
"state": "MA",
"postalCode": "02127",
"country": "US",
"phone": {
"number": "5555551234",
"kind": "home"
}
},
"paymentDetails": {
"paymentIdentifier": {
"cardIdentifier": "1234",
"expiryDate": "12/20"
},
"paymentMethod": "credit_card",
"paymentKind": "Visa"
},
"customAttributes": {
"storeId": "60cb07fc20387b000821c5c3",
"associateId": 1,
"trackingUrl": "609436d21baded0008945b05"
},
"status": "ACTIVE",
"isDeleted": false,
"deletedAt": "2019-01-01T00:00:00.000Z",
"channel": "WEBSITE",
"originOrderId": "22-4498-4800",
"offsetDays": 2,
"createdAt": "2021-10-12T21:35:05.756Z",
"updatedAt": "2021-10-14T05:40:55.997Z",
"statusUpdatedAt": "2021-10-14T10:24:36.468Z"
}
],
"query": {
"limit": 10,
"offset": 10,
"count": 100
}
}
}{
"responseStatus": "NOT_FOUND",
"message": "Subscription not found"
}Subscriptions
Get all subscriptions
Get all subscriptions (response is paginated)
GET
/
v1
/
subscriptions
Get all subscriptions
curl --request GET \
--url https://prod01.copilot.fabric.inc/data-subscription/v1/subscriptions \
--header 'Authorization: Bearer <token>'import requests
url = "https://prod01.copilot.fabric.inc/data-subscription/v1/subscriptions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://prod01.copilot.fabric.inc/data-subscription/v1/subscriptions', 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://prod01.copilot.fabric.inc/data-subscription/v1/subscriptions",
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://prod01.copilot.fabric.inc/data-subscription/v1/subscriptions"
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://prod01.copilot.fabric.inc/data-subscription/v1/subscriptions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod01.copilot.fabric.inc/data-subscription/v1/subscriptions")
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{
"responseStatus": "OK",
"message": "Request processed successfully",
"data": {
"subscriptions": [
{
"id": "6256610bc312410009b7390b",
"customer": {
"id": "62cffd65e8d7eb868c6a29d6",
"customerReferenceId": "12345",
"locale": "en_US",
"email": "customer@example.com",
"contactNumber": "+923333709568",
"firstName": "Pat",
"middleName": "E",
"lastName": "Kake",
"segment": [
"employee"
],
"employeeId": "345",
"communicationPreference": {
"email": true,
"sms": true
},
"status": "ACTIVE",
"createdAt": "2021-10-12T21:35:05.756Z",
"updatedAt": "2021-10-14T05:40:55.997Z"
},
"item": {
"id": 1000000006,
"sku": "MOBO-X570",
"quantity": 1,
"itemPrice": {
"price": 100,
"currencyCode": "USD"
},
"weight": 10,
"weightUnit": "lb",
"title": "Vitamin",
"description": "Vitamin C",
"tax": {
"taxCode": "FR020000",
"taxAmount": 10,
"currencyCode": "USD"
}
},
"plan": {
"frequency": 30,
"frequencyType": "Daily",
"id": "1001"
},
"offer": {
"id": "SUB-E10717",
"source": "PDP"
},
"shipping": {
"shipmentCarrier": "USPS",
"shipmentMethod": "Ground",
"shipmentInstructions": "Please leave the package in the box",
"taxCode": "SHP020000",
"shippingAmount": 10,
"taxAmount": 1,
"currencyCode": "USD"
},
"expiry": {
"expiryDate": "2022-07-18T09:16:11.437Z",
"billingCycles": 2
},
"shipTo": {
"name": {
"firstName": "Pat",
"lastName": "Kake",
"middleName": "E"
},
"streetAddress": {
"street1": "123 Main St",
"street2": "Suite 100"
},
"city": "Boston",
"state": "MA",
"postalCode": "02127",
"country": "US",
"phone": {
"number": "5555551234",
"kind": "home"
}
},
"billTo": {
"name": {
"firstName": "Pat",
"lastName": "Kake",
"middleName": "E"
},
"streetAddress": {
"street1": "123 Main St",
"street2": "Suite 100"
},
"city": "Boston",
"state": "MA",
"postalCode": "02127",
"country": "US",
"phone": {
"number": "5555551234",
"kind": "home"
}
},
"paymentDetails": {
"paymentIdentifier": {
"cardIdentifier": "1234",
"expiryDate": "12/20"
},
"paymentMethod": "credit_card",
"paymentKind": "Visa"
},
"customAttributes": {
"storeId": "60cb07fc20387b000821c5c3",
"associateId": 1,
"trackingUrl": "609436d21baded0008945b05"
},
"status": "ACTIVE",
"isDeleted": false,
"deletedAt": "2019-01-01T00:00:00.000Z",
"channel": "WEBSITE",
"originOrderId": "22-4498-4800",
"offsetDays": 2,
"createdAt": "2021-10-12T21:35:05.756Z",
"updatedAt": "2021-10-14T05:40:55.997Z",
"statusUpdatedAt": "2021-10-14T10:24:36.468Z"
}
],
"query": {
"limit": 10,
"offset": 10,
"count": 100
}
}
}{
"responseStatus": "NOT_FOUND",
"message": "Subscription not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Maximum number of subscriptions to return per page
Example:
10
Page number
Example:
0
Subscription status
Example:
"ACTIVE"
Was this page helpful?
