Subscriber Report
The Subscriber API allows organizations to retrieve a detailed list of their subscribers, enabling them to monitor and manage their subscribers (individual users associated with the organization’s accounts e.g. employees).
How it works
List all Subscribers
Send an HTTP GET request to 1GLOBAL to get complete list of all subscribers associated with the organization.
GET https://api.1global.com/enterprise/subscribers
The header should contain the URL, Request Access Token, and content-type as shown below:
curl -X GET \
https://api.1global.com/enterprise/subscribers \
-H 'Authorization: Bearer $ACCESS_TOKEN' \
-H 'Content-Type: application/json'
Example Response Body
A successful request returns an HTTP status 200
and a response body containing a list of all subscribers, along with the information associated with each subscriber: id
, first_name
, last_name
, email
, employee_id
and group
.
{
"_links": {
"self": {
"href": "https://api.1global.com/enterprise/subscribers?limit=10",
"method": "GET"
}
},
"_embedded": {
"subscribers": [
{
"id": "sbr_01DKW3KA40DHSSNV0KDE6CGJX2",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@abc.com",
"employee_id": "123123123",
"group": "G1",
"_links": {
"self": {
"href": "https://api.1global.com/enterprise/subscribers/sbr_01DKW3KA40DHSSNV0KDE6CGJX2",
"method": "GET"
}
}
},
{
"id": "sbr_01E6P5VCPG7P81JNGPMNG71C3N",
"first_name": "Arya",
"last_name": "Stark",
"email": "arya.stark@abc.com",
"employee_id": "456456456",
"group": "E1",
"_links": {
"self": {
"href": "https://api.1global.com/enterprise/subscribers/sbr_01E6P5VCPG7P81JNGPMNG71C3N",
"method": "GET"
}
}
},
{
"id": "sbr_01J0TD0SK13357ZBY42NS4DPEP",
"first_name": "David",
"last_name": "Wick",
"email": "david_wick@abc.com",
"employee_id": "789789789",
"group": "G1",
"_links": {
"self": {
"href": "https://api.1global.com/enterprise/subscribers/sbr_01J0TD0SK13357ZBY42NS4DPEP",
"method": "GET"
}
}
},
{
"id": "sbr_01J14Z4QW68ZDJG91MG7CRCR9N",
"first_name": "John",
"last_name": "Wick",
"email": "john_wick@abc.com",
"employee_id": "E1",
"group": "123456789",
"_links": {
"self": {
"href": "https://api.1global.com/enterprise/subscribers/sbr_01J14Z4QW68ZDJG91MG7CRCR9N",
"method": "GET"
}
}
},
]
}
}
Continue navigating through the next
links in the response until you have reviewed all the subscribers list.
Refer Standards - Pagination for more information on pagination.
NOTE: The query parameter
limit
determines the number of subscribers to be reflected in the response. The default limit is 10 to prevent the response from becoming too large, override this value if required.
Retrieve a Subscriber
Retrieves a single subscriber and its details by specifying the subscriber Id.
GET https://api.1global.com/enterprise/subscribers/{sbr_id}
The header should contain the endpoint URL along with the subscriber Id
, Request Access Token, and content-type as shown below:
curl -X GET \
https://api.1global.com/enterprise/subscribers/sbr_016X8YW9MRS87V6X6N7X0B32JM \
-H 'Authorization: Bearer $ACCESS_TOKEN' \
-H 'Content-Type: application/json'
Example Response Body
A successful request returns an HTTP status 200
and a response body containing information about the specified suscriber.
{
"id": "sbr_01J0TD0SK13357ZBY42NS4DPEP",
"first_name": "John",
"last_name": "Wick",
"email": "john_wick@abc.com",
"employee_id": "E1",
"group": "123456789",
"_links": {
"self": {
"href": "https://api.1global.com/enterprise/subscribers/sbr_01J14Z4QW68ZDJG91MG7CRCR9N",
"method": "GET"
}
}
}