Retrieve all subscriptions for a Bango User ID
curl --request GET \
--url https://virtserver.swaggerhub.com/BangoProducts/Subscriptions-API/1.4.0/subscription/bangouser/{bangoUserId} \
--header 'Authorization: Basic <encoded-value>'const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://virtserver.swaggerhub.com/BangoProducts/Subscriptions-API/1.4.0/subscription/bangouser/{bangoUserId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://virtserver.swaggerhub.com/BangoProducts/Subscriptions-API/1.4.0/subscription/bangouser/{bangoUserId}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text){
"responseCode": "OK",
"responseMessage": "Success",
"subscriptions": [
{
"subscriptionId": "123e4567-e89b-12d3-a456-426614174000",
"bangoUserId": "1234567890",
"externalKey": "my-external-identifier",
"entitlementStartDate": "2020-08-19",
"merchantAccountKey": "BANGO_ENTERTAINMENT",
"productName": "bango-music",
"extensionData": {
"myCustomField": "my-custom-value",
"mySecondCustomField": "another-value"
},
"billingPeriod": "MONTHLY",
"phaseType": "TRIAL",
"priceList": "<string>",
"planName": "bango-music-3-months-free",
"state": "ACTIVE",
"cancelledDate": "2023-12-25",
"chargedThroughDate": "2023-12-25",
"billingStartDate": "2023-12-25",
"billingEndDate": "2023-12-25",
"billCycleDayLocal": 1,
"nextPayment": {
"amount": 9.99,
"currency": "USD",
"date": "2023-12-25"
},
"lastPayment": {
"amount": 9.99,
"currency": "USD",
"date": "2023-12-25"
},
"events": [
{
"eventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"billingPeriod": "MONTHLY",
"effectiveDate": "2023-12-25",
"planName": "bango-music-3-months-free",
"productName": "bango-music",
"priceList": "<string>",
"eventType": "START_BILLING",
"isBlockedBilling": true,
"isBlockedEntitlement": true,
"serviceName": "<string>",
"serviceStateName": "<string>",
"phase": "<string>",
"auditLogs": [
{
"changeType": "UPDATE",
"changeDate": "2023-11-07T05:31:56Z",
"objectType": "SUBSCRIPTION",
"objectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"changedBy": "admin",
"reasonCode": null,
"comments": null,
"userToken": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"history": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedDate": "2023-11-07T05:31:56Z",
"createdDate": "2023-11-07T05:31:56Z"
}
}
]
}
],
"priceOverrides": [
{
"planName": "bango-music-3-months-free",
"phaseName": "free-trial",
"phaseType": "TRIAL",
"fixedPrice": 0,
"recurringPrice": 0
}
],
"prices": [
{
"planName": "bango-music-3-months-free",
"phaseName": "free-trial",
"phaseType": "TRIAL",
"fixedPrice": 0,
"recurringPrice": 0
}
],
"auditLogs": [
{
"changeType": "UPDATE",
"changeDate": "2023-11-07T05:31:56Z",
"objectType": "SUBSCRIPTION",
"objectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"changedBy": "admin",
"reasonCode": null,
"comments": null,
"userToken": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"history": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedDate": "2023-11-07T05:31:56Z",
"createdDate": "2023-11-07T05:31:56Z"
}
}
]
}
]
}{
"responseCode": "BAD_REQUEST",
"responseMessage": "Invalid request"
}{
"responseCode": "UNAUTHORIZED",
"responseMessage": "Invalid access credential"
}{
"responseCode": "NOT_FOUND",
"responseMessage": "Bango User Id not found"
}{
"responseCode": "TOO_MANY_REQUESTS",
"responseMessage": "Request limit reached. Please try again later"
}{
"responseCode": "INTERNAL_ERROR",
"responseMessage": "The server encountered an unexpected condition which prevented it from fulfilling the request"
}{
"responseCode": "SERVICE_UNAVAILABLE",
"responseMessage": "The server is undergoing maintenance and is not available. Please, try again later"
}Retrieve all subscriptions for a Bango User ID
Use this endpoint to retrieve all details of all subscriptions for a single user, identified by a Bango User Id.
GET
https://virtserver.swaggerhub.com/BangoProducts/Subscriptions-API/1.4.0
/
subscription
/
bangouser
/
{bangoUserId}
Retrieve all subscriptions for a Bango User ID
curl --request GET \
--url https://virtserver.swaggerhub.com/BangoProducts/Subscriptions-API/1.4.0/subscription/bangouser/{bangoUserId} \
--header 'Authorization: Basic <encoded-value>'const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://virtserver.swaggerhub.com/BangoProducts/Subscriptions-API/1.4.0/subscription/bangouser/{bangoUserId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://virtserver.swaggerhub.com/BangoProducts/Subscriptions-API/1.4.0/subscription/bangouser/{bangoUserId}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text){
"responseCode": "OK",
"responseMessage": "Success",
"subscriptions": [
{
"subscriptionId": "123e4567-e89b-12d3-a456-426614174000",
"bangoUserId": "1234567890",
"externalKey": "my-external-identifier",
"entitlementStartDate": "2020-08-19",
"merchantAccountKey": "BANGO_ENTERTAINMENT",
"productName": "bango-music",
"extensionData": {
"myCustomField": "my-custom-value",
"mySecondCustomField": "another-value"
},
"billingPeriod": "MONTHLY",
"phaseType": "TRIAL",
"priceList": "<string>",
"planName": "bango-music-3-months-free",
"state": "ACTIVE",
"cancelledDate": "2023-12-25",
"chargedThroughDate": "2023-12-25",
"billingStartDate": "2023-12-25",
"billingEndDate": "2023-12-25",
"billCycleDayLocal": 1,
"nextPayment": {
"amount": 9.99,
"currency": "USD",
"date": "2023-12-25"
},
"lastPayment": {
"amount": 9.99,
"currency": "USD",
"date": "2023-12-25"
},
"events": [
{
"eventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"billingPeriod": "MONTHLY",
"effectiveDate": "2023-12-25",
"planName": "bango-music-3-months-free",
"productName": "bango-music",
"priceList": "<string>",
"eventType": "START_BILLING",
"isBlockedBilling": true,
"isBlockedEntitlement": true,
"serviceName": "<string>",
"serviceStateName": "<string>",
"phase": "<string>",
"auditLogs": [
{
"changeType": "UPDATE",
"changeDate": "2023-11-07T05:31:56Z",
"objectType": "SUBSCRIPTION",
"objectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"changedBy": "admin",
"reasonCode": null,
"comments": null,
"userToken": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"history": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedDate": "2023-11-07T05:31:56Z",
"createdDate": "2023-11-07T05:31:56Z"
}
}
]
}
],
"priceOverrides": [
{
"planName": "bango-music-3-months-free",
"phaseName": "free-trial",
"phaseType": "TRIAL",
"fixedPrice": 0,
"recurringPrice": 0
}
],
"prices": [
{
"planName": "bango-music-3-months-free",
"phaseName": "free-trial",
"phaseType": "TRIAL",
"fixedPrice": 0,
"recurringPrice": 0
}
],
"auditLogs": [
{
"changeType": "UPDATE",
"changeDate": "2023-11-07T05:31:56Z",
"objectType": "SUBSCRIPTION",
"objectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"changedBy": "admin",
"reasonCode": null,
"comments": null,
"userToken": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"history": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedDate": "2023-11-07T05:31:56Z",
"createdDate": "2023-11-07T05:31:56Z"
}
}
]
}
]
}{
"responseCode": "BAD_REQUEST",
"responseMessage": "Invalid request"
}{
"responseCode": "UNAUTHORIZED",
"responseMessage": "Invalid access credential"
}{
"responseCode": "NOT_FOUND",
"responseMessage": "Bango User Id not found"
}{
"responseCode": "TOO_MANY_REQUESTS",
"responseMessage": "Request limit reached. Please try again later"
}{
"responseCode": "INTERNAL_ERROR",
"responseMessage": "The server encountered an unexpected condition which prevented it from fulfilling the request"
}{
"responseCode": "SERVICE_UNAVAILABLE",
"responseMessage": "The server is undergoing maintenance and is not available. Please, try again later"
}Authorizations
Base64 encoding of username:password as supplied by Bango Support
Path Parameters
The Bango user identifier. This is a globally unique, opaque string.
Example:
"1234567890"
Query Parameters
- FULL will return ...
- MINIMAL will return only
UPDATEaudit events - NONE will return no audit events
Available options:
FULL, MINIMAL, NONE 
