Subscription add-ons are features or top-ups that extend the functionality offered to the end user through their subscription, as defined by the associated add-on.
Type of object is always subscriptionAddon.
subscriptionAddon Unique identifier for the subscription add-on.
"sad_0SNlurA049MEWV2UNWPbDfW5B40U"Time when the subscription add-on was activated.
"2021-01-15T12:36:57Z"Time when the subscription add-on was canceled.
"2021-01-22T19:39:53Z"Time when the subscription add-on was created.
"2021-01-15T12:30:28Z"Sequence number of the period.
1>= 1Beginning of the period.
"2021-01-21T19:32:13Z"End of the period.
"2021-02-20T19:38:34Z"Time when the subscription add-on was ended. The value is null if the subscription add-on is not ended.
"2021-01-30T23:12:28Z"The current status of the subscription add-on.
pending initiated active ended Unique identifier of the subscription the add-on applies to.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"Unique identifier of the user the subscription add-on belongs to.
"usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"{
"object": "subscriptionAddon",
"id": "sad_0SNlurA049MEWV2UNWPbDfW5B40U",
"activatedAt": "2021-01-15T12:36:57Z",
"addon": {
"object": "addon",
"id": "add_0SNlurA049MEWV4VxLfwJc7PJtHc",
"metadata": {},
"activationTrigger": "creation",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": {
"0": "DE",
"1": "FR",
"2": "US"
},
"name": "Europe"
},
"createdAt": "2021-01-21T19:12:28.0Z",
"description": "Disable international roaming.",
"name": "1GB Data Top-up",
"plans": [
"pln_0SNlurA049MEWV3V0q7gjQbM4EVo"
],
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"recurrenceType": "oneTime",
"status": "draft",
"type": "topUp",
"validity": {
"unit": "day",
"value": 7
},
"data": 10000000000,
"dataUnit": "byte",
"sms": 100,
"smsUnit": "message",
"voice": 30000,
"voiceUnit": "second"
},
"billing": {
"discount": {
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"expiresAt": "2021-02-20T19:38:34Z"
}
},
"canceledAt": "2021-01-22T19:39:53Z",
"createdAt": "2021-01-15T12:30:28.0Z",
"currentPeriod": {
"number": 1,
"start": "2021-01-21T19:32:13.0Z",
"end": "2021-02-20T19:38:34.0Z"
},
"endedAt": "2021-01-30T23:12:28Z",
"status": "pending",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
}
Returns a list of subscription add-ons. The subscription add-ons returned are sorted by creation date, with the most recently created subscription add-ons appearing first.
The unique identifier for the add-on to be filtered by.
"add_0SNlurA049MEWV4VxLfwJc7PJtHc"A comma-separated list of statuses to filter the subscription add-ons by.
pending,initiated,activeThe unique identifier for the subscription to be filtered by.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"The unique identifier for the user to be filtered by.
"usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"A cursor for use in pagination. The after parameter takes an object ID that defines the position in the list, only items immediately following the item with that ID will be returned.
A cursor for use in pagination. The before parameter takes an object ID that defines the position in the list, only items immediately preceding the item with that ID will be returned.
The limit of items to be returned in the list, between 0 and 200.
2010>= 0<= 200Returns a dictionary with an items property that contains an array of subscription add-ons.
Type of object is always list.
list subscriptionAddon.A unique identifier to be used as after pagination parameter if more items are available sorted after the current batch of items.
A unique identifier to be used as before pagination parameter if more items are available sorted before the current batch of items.
curl https://api.gigs.com/projects/${GIGS_PROJECT}/subscriptionAddons \
-X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${GIGS_TOKEN}" \
-H "Accept: application/json"
{
"object": "list",
"items": [
{
"object": "subscriptionAddon",
"id": "sad_0SNlurA049MEWV2UNWPbDfW5B40U",
"activatedAt": "2021-01-15T12:36:57Z",
"addon": {
"object": "addon",
"id": "add_0SNlurA049MEWV4VxLfwJc7PJtHc",
"metadata": {},
"activationTrigger": "creation",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"createdAt": "2021-01-21T19:12:28Z",
"description": "Disable international roaming.",
"name": "1GB Data Top-up",
"plans": [
"pln_0SNlurA049MEWV3V0q7gjQbM4EVo"
],
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"recurrenceType": "oneTime",
"status": "draft",
"type": "topUp",
"validity": {
"unit": "day",
"value": 7
},
"data": 10000000000,
"dataUnit": "byte",
"sms": 100,
"smsUnit": "message",
"voice": 30000,
"voiceUnit": "second"
},
"billing": {
"discount": {
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"expiresAt": "2021-02-20T19:38:34Z"
}
},
"canceledAt": "2021-01-22T19:39:53Z",
"createdAt": "2021-01-15T12:30:28Z",
"currentPeriod": {
"number": 1,
"start": "2021-01-21T19:32:13Z",
"end": "2021-02-20T19:38:34Z"
},
"endedAt": "2021-01-30T23:12:28Z",
"status": "pending",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
}
],
"moreItemsAfter": null,
"moreItemsBefore": null
}
Creates a new subscription add-on for an existing subscription in the specified project.
Unique identifier of the add-on.
"add_0SNlurA049MEWV4VxLfwJc7PJtHc"Unique identifier of the subscription the add-on applies to.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"Returns the newly created subscription add-on.
Type of object is always subscriptionAddon.
subscriptionAddon Unique identifier for the subscription add-on.
"sad_0SNlurA049MEWV2UNWPbDfW5B40U"Time when the subscription add-on was activated.
"2021-01-15T12:36:57Z"Time when the subscription add-on was canceled.
"2021-01-22T19:39:53Z"Time when the subscription add-on was created.
"2021-01-15T12:30:28Z"Sequence number of the period.
1>= 1Beginning of the period.
"2021-01-21T19:32:13Z"End of the period.
"2021-02-20T19:38:34Z"Time when the subscription add-on was ended. The value is null if the subscription add-on is not ended.
"2021-01-30T23:12:28Z"The current status of the subscription add-on.
pending initiated active ended Unique identifier of the subscription the add-on applies to.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"Unique identifier of the user the subscription add-on belongs to.
"usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"curl https://api.gigs.com/projects/${GIGS_PROJECT}/subscriptionAddons \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${GIGS_TOKEN}" \
-H "Accept: application/json" \
-d '{
"addon": "add_0SNlurA049MEWV4VxLfwJc7PJtHc",
"billing": {
"discount": {
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN"
}
},
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi"
}'
{
"object": "subscriptionAddon",
"id": "sad_0SNlurA049MEWV2UNWPbDfW5B40U",
"activatedAt": "2021-01-15T12:36:57Z",
"addon": {
"object": "addon",
"id": "add_0SNlurA049MEWV4VxLfwJc7PJtHc",
"metadata": {},
"activationTrigger": "creation",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"createdAt": "2021-01-21T19:12:28Z",
"description": "Disable international roaming.",
"name": "1GB Data Top-up",
"plans": [
"pln_0SNlurA049MEWV3V0q7gjQbM4EVo"
],
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"recurrenceType": "oneTime",
"status": "draft",
"type": "topUp",
"validity": {
"unit": "day",
"value": 7
},
"data": 10000000000,
"dataUnit": "byte",
"sms": 100,
"smsUnit": "message",
"voice": 30000,
"voiceUnit": "second"
},
"billing": {
"discount": {
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"expiresAt": "2021-02-20T19:38:34Z"
}
},
"canceledAt": "2021-01-22T19:39:53Z",
"createdAt": "2021-01-15T12:30:28Z",
"currentPeriod": {
"number": 1,
"start": "2021-01-21T19:32:13Z",
"end": "2021-02-20T19:38:34Z"
},
"endedAt": "2021-01-30T23:12:28Z",
"status": "pending",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
}
Retrieve the details of an existing subscription add-on which the authenticated user is authorized to view.
The unique identifier for the subscription add-on.
"sad_0SNlurA049MEWV2UNWPbDfW5B40U"Returns the subscription add-on if it exists.
Type of object is always subscriptionAddon.
subscriptionAddon Unique identifier for the subscription add-on.
"sad_0SNlurA049MEWV2UNWPbDfW5B40U"Time when the subscription add-on was activated.
"2021-01-15T12:36:57Z"Time when the subscription add-on was canceled.
"2021-01-22T19:39:53Z"Time when the subscription add-on was created.
"2021-01-15T12:30:28Z"Sequence number of the period.
1>= 1Beginning of the period.
"2021-01-21T19:32:13Z"End of the period.
"2021-02-20T19:38:34Z"Time when the subscription add-on was ended. The value is null if the subscription add-on is not ended.
"2021-01-30T23:12:28Z"The current status of the subscription add-on.
pending initiated active ended Unique identifier of the subscription the add-on applies to.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"Unique identifier of the user the subscription add-on belongs to.
"usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"curl https://api.gigs.com/projects/${GIGS_PROJECT}/subscriptionAddons/{subscriptionAddon} \
-X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${GIGS_TOKEN}" \
-H "Accept: application/json"
{
"object": "subscriptionAddon",
"id": "sad_0SNlurA049MEWV2UNWPbDfW5B40U",
"activatedAt": "2021-01-15T12:36:57Z",
"addon": {
"object": "addon",
"id": "add_0SNlurA049MEWV4VxLfwJc7PJtHc",
"metadata": {},
"activationTrigger": "creation",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"createdAt": "2021-01-21T19:12:28Z",
"description": "Disable international roaming.",
"name": "1GB Data Top-up",
"plans": [
"pln_0SNlurA049MEWV3V0q7gjQbM4EVo"
],
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"recurrenceType": "oneTime",
"status": "draft",
"type": "topUp",
"validity": {
"unit": "day",
"value": 7
},
"data": 10000000000,
"dataUnit": "byte",
"sms": 100,
"smsUnit": "message",
"voice": 30000,
"voiceUnit": "second"
},
"billing": {
"discount": {
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"expiresAt": "2021-02-20T19:38:34Z"
}
},
"canceledAt": "2021-01-22T19:39:53Z",
"createdAt": "2021-01-15T12:30:28Z",
"currentPeriod": {
"number": 1,
"start": "2021-01-21T19:32:13Z",
"end": "2021-02-20T19:38:34Z"
},
"endedAt": "2021-01-30T23:12:28Z",
"status": "pending",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
}
Ends a subscription add-on immediately. Subscription add-ons that are already ended cannot be ended again.
The unique identifier for the subscription add-on.
"sad_0SNlurA049MEWV2UNWPbDfW5B40U"Returns the ended subscription add-on.
Type of object is always subscriptionAddon.
subscriptionAddon Unique identifier for the subscription add-on.
"sad_0SNlurA049MEWV2UNWPbDfW5B40U"Time when the subscription add-on was activated.
"2021-01-15T12:36:57Z"Time when the subscription add-on was canceled.
"2021-01-22T19:39:53Z"Time when the subscription add-on was created.
"2021-01-15T12:30:28Z"Sequence number of the period.
1>= 1Beginning of the period.
"2021-01-21T19:32:13Z"End of the period.
"2021-02-20T19:38:34Z"Time when the subscription add-on was ended. The value is null if the subscription add-on is not ended.
"2021-01-30T23:12:28Z"The current status of the subscription add-on.
pending initiated active ended Unique identifier of the subscription the add-on applies to.
"sub_0SNlurA049MEWV2gSfSxi00xlPIi"Unique identifier of the user the subscription add-on belongs to.
"usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"curl https://api.gigs.com/projects/${GIGS_PROJECT}/subscriptionAddons/{subscriptionAddon} \
-X DELETE \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${GIGS_TOKEN}" \
-H "Accept: application/json"
{
"object": "subscriptionAddon",
"id": "sad_0SNlurA049MEWV2UNWPbDfW5B40U",
"activatedAt": "2021-01-15T12:36:57Z",
"addon": {
"object": "addon",
"id": "add_0SNlurA049MEWV4VxLfwJc7PJtHc",
"metadata": {},
"activationTrigger": "creation",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"createdAt": "2021-01-21T19:12:28Z",
"description": "Disable international roaming.",
"name": "1GB Data Top-up",
"plans": [
"pln_0SNlurA049MEWV3V0q7gjQbM4EVo"
],
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"recurrenceType": "oneTime",
"status": "draft",
"type": "topUp",
"validity": {
"unit": "day",
"value": 7
},
"data": 10000000000,
"dataUnit": "byte",
"sms": 100,
"smsUnit": "message",
"voice": 30000,
"voiceUnit": "second"
},
"billing": {
"discount": {
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"expiresAt": "2021-02-20T19:38:34Z"
}
},
"canceledAt": "2021-01-22T19:39:53Z",
"createdAt": "2021-01-15T12:30:28Z",
"currentPeriod": {
"number": 1,
"start": "2021-01-21T19:32:13Z",
"end": "2021-02-20T19:38:34Z"
},
"endedAt": "2021-01-30T23:12:28Z",
"status": "pending",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
}