Properties
- Name
object
- Type
- string
- Description
Type of object is always
addon
.Allowed values:addon
- Name
id
- Type
- string
- Description
Unique identifier for the add-on.
Example:"add_0SNlurA049MEWV4VxLfwJc7PJtHc"
- Name
allowances
- Type
- object
- Description
- The allowances included in the add-on.
- Name
dataBytes
- Type
- nullable integer
- Description
The data allowance in bytes. A value of
null
indicates unlimited data.Example:10000000000
required- Name
voiceSeconds
- Type
- nullable integer
- Description
The voice call allowance in seconds. A value of
null
indicates unlimited calls.Example:30000
required- Name
smsMessages
- Type
- nullable integer
- Description
The SMS allowance in messages. A value of
null
indicates unlimited SMS.Example:100
required
- Name
createdAt
- Type
- string
- Description
Time when the add-on was created .
Example:"2021-01-21T19:12:28Z"
- Name
description
- Type
- nullable string
- Description
The description of the add-on.
Example:"Disable international roaming."
- Name
name
- Type
- string
- Description
Name for the add-on.
Example:"1GB Data Top-up"
- Name
plans
- Type
- array
- Description
The plans this add-on is compatible with.
- Name
price
- Type
- object
- Description
- The price of the add-on.
- Name
amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Example:999
>= 0
required- Name
currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:"USD"
required
- Name
provider
- Type
- string
- Description
The ID of the network provider supported by this add-on.
Example:"p5"
- Name
recurrenceType
- Type
- string
- Description
The recurrence type the add-on.
Example:"oneTime"
Allowed values:oneTime, recurring
- Name
status
- Type
- string
- Description
The current status of the add-on.
Allowed values:draft, available, archived
- Name
type
- Type
- string
- Description
The type of the add-on.
Example:"topUp"
Allowed values:topUp, other
- Name
validity
- Type
- nullable object
- Description
- The optional validity of the add-on. Add-ons without a set validity will inherit the validity of the subscribed plan.
- Name
unit
- Type
- string
- Description
The time unit of the add-on, either
day
ormonth
.Allowed values:day, month
required- Name
value
- Type
- integer
- Description
The amount of units (specified in the
unit
property).Example:7
>= 1
required
- Name
data
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The data allowance in bytes included in this add-on. A value of
-1
indicates unlimited data.Example:10000000000
- Name
dataUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the data value is always
byte
.Allowed values:byte
- Name
sms
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The sms allowance included in this add-on. A value of
-1
indicates unlimited sms.Example:100
- Name
smsUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the sms value is always
sms
.Allowed values:message
- Name
voice
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The voice call allowance in seconds included in this add-on. A value of
-1
indicates unlimited voice calls.Example:30000
- Name
voiceUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the voice value is always
second
.Allowed values:second
Response
{
"object": "addon",
"id": "add_0SNlurA049MEWV4VxLfwJc7PJtHc",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"createdAt": "2021-01-21T19:12:28Z",
"description": "Disable international roaming.",
"name": "1GB Data Top-up",
"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"
}
Archive an add-on
Set the status of an add-on to archived. An archived add-on can not be added to subscriptions.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:"gigs"
required- Name
addon
- Type
- string
- Description
The unique identifier for the add-on.
Example:"add_0SNlurA049MEWV4VxLfwJc7PJtHc"
required
Response Schemas
Returns the archived add-on.
- Name
object
- Type
- string
- Description
Type of object is always
addon
.Allowed values:addon
required- Name
id
- Type
- string
- Description
Unique identifier for the add-on.
Example:"add_0SNlurA049MEWV4VxLfwJc7PJtHc"
required- Name
allowances
- Type
- object
- Description
- The allowances included in the add-on.
- Name
dataBytes
- Type
- nullable integer
- Description
The data allowance in bytes. A value of
null
indicates unlimited data.Example:10000000000
required- Name
voiceSeconds
- Type
- nullable integer
- Description
The voice call allowance in seconds. A value of
null
indicates unlimited calls.Example:30000
required- Name
smsMessages
- Type
- nullable integer
- Description
The SMS allowance in messages. A value of
null
indicates unlimited SMS.Example:100
required
required- Name
createdAt
- Type
- string
- Description
Time when the add-on was created .
Example:"2021-01-21T19:12:28Z"
required- Name
description
- Type
- nullable string
- Description
The description of the add-on.
Example:"Disable international roaming."
required- Name
name
- Type
- string
- Description
Name for the add-on.
Example:"1GB Data Top-up"
required- Name
plans
- Type
- array
- Description
The plans this add-on is compatible with.
required- Name
price
- Type
- object
- Description
- The price of the add-on.
- Name
amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Example:999
>= 0
required- Name
currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:"USD"
required
required- Name
provider
- Type
- string
- Description
The ID of the network provider supported by this add-on.
Example:"p5"
required- Name
recurrenceType
- Type
- string
- Description
The recurrence type the add-on.
Example:"oneTime"
Allowed values:oneTime, recurring
required- Name
status
- Type
- string
- Description
The current status of the add-on.
Allowed values:draft, available, archived
required- Name
type
- Type
- string
- Description
The type of the add-on.
Example:"topUp"
Allowed values:topUp, other
required- Name
validity
- Type
- nullable object
- Description
- The optional validity of the add-on. Add-ons without a set validity will inherit the validity of the subscribed plan.
- Name
unit
- Type
- string
- Description
The time unit of the add-on, either
day
ormonth
.Allowed values:day, month
required- Name
value
- Type
- integer
- Description
The amount of units (specified in the
unit
property).Example:7
>= 1
required
required- Name
data
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The data allowance in bytes included in this add-on. A value of
-1
indicates unlimited data.Example:10000000000
required- Name
dataUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the data value is always
byte
.Allowed values:byte
required- Name
sms
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The sms allowance included in this add-on. A value of
-1
indicates unlimited sms.Example:100
required- Name
smsUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the sms value is always
sms
.Allowed values:message
required- Name
voice
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The voice call allowance in seconds included in this add-on. A value of
-1
indicates unlimited voice calls.Example:30000
required- Name
voiceUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the voice value is always
second
.Allowed values:second
required
Request
curl https://api.gigs.com/projects/{project}/addons/{addon}/archive \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "addon",
"id": "add_0SNlurA049MEWV4VxLfwJc7PJtHc",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"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"
}
Retrieve an add-on
Retrieves the details of an existing add-on.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:"gigs"
required- Name
addon
- Type
- string
- Description
The unique identifier for the add-on.
Example:"add_0SNlurA049MEWV4VxLfwJc7PJtHc"
required
Response Schemas
Returns the add-on object if it exists.
- Name
object
- Type
- string
- Description
Type of object is always
addon
.Allowed values:addon
required- Name
id
- Type
- string
- Description
Unique identifier for the add-on.
Example:"add_0SNlurA049MEWV4VxLfwJc7PJtHc"
required- Name
allowances
- Type
- object
- Description
- The allowances included in the add-on.
- Name
dataBytes
- Type
- nullable integer
- Description
The data allowance in bytes. A value of
null
indicates unlimited data.Example:10000000000
required- Name
voiceSeconds
- Type
- nullable integer
- Description
The voice call allowance in seconds. A value of
null
indicates unlimited calls.Example:30000
required- Name
smsMessages
- Type
- nullable integer
- Description
The SMS allowance in messages. A value of
null
indicates unlimited SMS.Example:100
required
required- Name
createdAt
- Type
- string
- Description
Time when the add-on was created .
Example:"2021-01-21T19:12:28Z"
required- Name
description
- Type
- nullable string
- Description
The description of the add-on.
Example:"Disable international roaming."
required- Name
name
- Type
- string
- Description
Name for the add-on.
Example:"1GB Data Top-up"
required- Name
plans
- Type
- array
- Description
The plans this add-on is compatible with.
required- Name
price
- Type
- object
- Description
- The price of the add-on.
- Name
amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Example:999
>= 0
required- Name
currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:"USD"
required
required- Name
provider
- Type
- string
- Description
The ID of the network provider supported by this add-on.
Example:"p5"
required- Name
recurrenceType
- Type
- string
- Description
The recurrence type the add-on.
Example:"oneTime"
Allowed values:oneTime, recurring
required- Name
status
- Type
- string
- Description
The current status of the add-on.
Allowed values:draft, available, archived
required- Name
type
- Type
- string
- Description
The type of the add-on.
Example:"topUp"
Allowed values:topUp, other
required- Name
validity
- Type
- nullable object
- Description
- The optional validity of the add-on. Add-ons without a set validity will inherit the validity of the subscribed plan.
- Name
unit
- Type
- string
- Description
The time unit of the add-on, either
day
ormonth
.Allowed values:day, month
required- Name
value
- Type
- integer
- Description
The amount of units (specified in the
unit
property).Example:7
>= 1
required
required- Name
data
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The data allowance in bytes included in this add-on. A value of
-1
indicates unlimited data.Example:10000000000
required- Name
dataUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the data value is always
byte
.Allowed values:byte
required- Name
sms
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The sms allowance included in this add-on. A value of
-1
indicates unlimited sms.Example:100
required- Name
smsUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the sms value is always
sms
.Allowed values:message
required- Name
voice
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The voice call allowance in seconds included in this add-on. A value of
-1
indicates unlimited voice calls.Example:30000
required- Name
voiceUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the voice value is always
second
.Allowed values:second
required
Request
curl https://api.gigs.com/projects/{project}/addons/{addon} \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "addon",
"id": "add_0SNlurA049MEWV4VxLfwJc7PJtHc",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"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"
}
Update an add-on
Updates an add-on's name and description.
Body
- Name
name
- Type
- nullable string
- Description
The name of the add-on, meant to be displayable to users.
Example:"1GB Data Top-up"
- Name
description
- Type
- nullable string
- Description
The description of the add-on.
Example:"Disable international roaming."
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:"gigs"
required- Name
addon
- Type
- string
- Description
The unique identifier for the add-on.
Example:"add_0SNlurA049MEWV4VxLfwJc7PJtHc"
required
Response Schemas
Returns the updated add-on.
- Name
object
- Type
- string
- Description
Type of object is always
addon
.Allowed values:addon
required- Name
id
- Type
- string
- Description
Unique identifier for the add-on.
Example:"add_0SNlurA049MEWV4VxLfwJc7PJtHc"
required- Name
allowances
- Type
- object
- Description
- The allowances included in the add-on.
- Name
dataBytes
- Type
- nullable integer
- Description
The data allowance in bytes. A value of
null
indicates unlimited data.Example:10000000000
required- Name
voiceSeconds
- Type
- nullable integer
- Description
The voice call allowance in seconds. A value of
null
indicates unlimited calls.Example:30000
required- Name
smsMessages
- Type
- nullable integer
- Description
The SMS allowance in messages. A value of
null
indicates unlimited SMS.Example:100
required
required- Name
createdAt
- Type
- string
- Description
Time when the add-on was created .
Example:"2021-01-21T19:12:28Z"
required- Name
description
- Type
- nullable string
- Description
The description of the add-on.
Example:"Disable international roaming."
required- Name
name
- Type
- string
- Description
Name for the add-on.
Example:"1GB Data Top-up"
required- Name
plans
- Type
- array
- Description
The plans this add-on is compatible with.
required- Name
price
- Type
- object
- Description
- The price of the add-on.
- Name
amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Example:999
>= 0
required- Name
currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:"USD"
required
required- Name
provider
- Type
- string
- Description
The ID of the network provider supported by this add-on.
Example:"p5"
required- Name
recurrenceType
- Type
- string
- Description
The recurrence type the add-on.
Example:"oneTime"
Allowed values:oneTime, recurring
required- Name
status
- Type
- string
- Description
The current status of the add-on.
Allowed values:draft, available, archived
required- Name
type
- Type
- string
- Description
The type of the add-on.
Example:"topUp"
Allowed values:topUp, other
required- Name
validity
- Type
- nullable object
- Description
- The optional validity of the add-on. Add-ons without a set validity will inherit the validity of the subscribed plan.
- Name
unit
- Type
- string
- Description
The time unit of the add-on, either
day
ormonth
.Allowed values:day, month
required- Name
value
- Type
- integer
- Description
The amount of units (specified in the
unit
property).Example:7
>= 1
required
required- Name
data
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The data allowance in bytes included in this add-on. A value of
-1
indicates unlimited data.Example:10000000000
required- Name
dataUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the data value is always
byte
.Allowed values:byte
required- Name
sms
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The sms allowance included in this add-on. A value of
-1
indicates unlimited sms.Example:100
required- Name
smsUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the sms value is always
sms
.Allowed values:message
required- Name
voice
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The voice call allowance in seconds included in this add-on. A value of
-1
indicates unlimited voice calls.Example:30000
required- Name
voiceUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the voice value is always
second
.Allowed values:second
required
Request
curl https://api.gigs.com/projects/{project}/addons/{addon} \
-X PATCH \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d "{\"name\":\"1GB Data Top-up\",\"description\":\"Disable international roaming.\"}"
Response
{
"object": "addon",
"id": "add_0SNlurA049MEWV4VxLfwJc7PJtHc",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"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"
}
Publish an add-on
Set the status of an add-on to available. Available add-ons can be added to subscriptions.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:"gigs"
required- Name
addon
- Type
- string
- Description
The unique identifier for the add-on.
Example:"add_0SNlurA049MEWV4VxLfwJc7PJtHc"
required
Response Schemas
Returns the available add-on.
- Name
object
- Type
- string
- Description
Type of object is always
addon
.Allowed values:addon
required- Name
id
- Type
- string
- Description
Unique identifier for the add-on.
Example:"add_0SNlurA049MEWV4VxLfwJc7PJtHc"
required- Name
allowances
- Type
- object
- Description
- The allowances included in the add-on.
- Name
dataBytes
- Type
- nullable integer
- Description
The data allowance in bytes. A value of
null
indicates unlimited data.Example:10000000000
required- Name
voiceSeconds
- Type
- nullable integer
- Description
The voice call allowance in seconds. A value of
null
indicates unlimited calls.Example:30000
required- Name
smsMessages
- Type
- nullable integer
- Description
The SMS allowance in messages. A value of
null
indicates unlimited SMS.Example:100
required
required- Name
createdAt
- Type
- string
- Description
Time when the add-on was created .
Example:"2021-01-21T19:12:28Z"
required- Name
description
- Type
- nullable string
- Description
The description of the add-on.
Example:"Disable international roaming."
required- Name
name
- Type
- string
- Description
Name for the add-on.
Example:"1GB Data Top-up"
required- Name
plans
- Type
- array
- Description
The plans this add-on is compatible with.
required- Name
price
- Type
- object
- Description
- The price of the add-on.
- Name
amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Example:999
>= 0
required- Name
currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:"USD"
required
required- Name
provider
- Type
- string
- Description
The ID of the network provider supported by this add-on.
Example:"p5"
required- Name
recurrenceType
- Type
- string
- Description
The recurrence type the add-on.
Example:"oneTime"
Allowed values:oneTime, recurring
required- Name
status
- Type
- string
- Description
The current status of the add-on.
Allowed values:draft, available, archived
required- Name
type
- Type
- string
- Description
The type of the add-on.
Example:"topUp"
Allowed values:topUp, other
required- Name
validity
- Type
- nullable object
- Description
- The optional validity of the add-on. Add-ons without a set validity will inherit the validity of the subscribed plan.
- Name
unit
- Type
- string
- Description
The time unit of the add-on, either
day
ormonth
.Allowed values:day, month
required- Name
value
- Type
- integer
- Description
The amount of units (specified in the
unit
property).Example:7
>= 1
required
required- Name
data
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The data allowance in bytes included in this add-on. A value of
-1
indicates unlimited data.Example:10000000000
required- Name
dataUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the data value is always
byte
.Allowed values:byte
required- Name
sms
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The sms allowance included in this add-on. A value of
-1
indicates unlimited sms.Example:100
required- Name
smsUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the sms value is always
sms
.Allowed values:message
required- Name
voice
- Type
- integer DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The voice call allowance in seconds included in this add-on. A value of
-1
indicates unlimited voice calls.Example:30000
required- Name
voiceUnit
- Type
- string DEPRECATED
- Description
Deprecated
This property is deprecated and will be removed in the future. Use
allowances
instead.The unit of the voice value is always
second
.Allowed values:second
required
Request
curl https://api.gigs.com/projects/{project}/addons/{addon}/publish \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "addon",
"id": "add_0SNlurA049MEWV4VxLfwJc7PJtHc",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"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"
}
List all add-ons
List add-ons. By default only add-ons with a status of 'available' are returned.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:"gigs"
required
Query Parameters
- Name
after
- Type
- string
- Description
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.
- Name
before
- Type
- string
- Description
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.
- Name
limit
- Type
- integer
- Description
The limit of items to be returned in the list, between 0 and 200.
Default:10
>= 0
<= 200
- Name
provider
- Type
- string
- Description
The provider of the add-on to be filtered by.
Example:"p4"
- Name
plan
- Type
- string
- Description
Limit the list of add-ons to those compatible with the given plan id.
Example:"pln_0SNlurA049MEWV3V0q7gjQbM4EVo"
- Name
status
- Type
- string
- Description
The status of the add-on to be filtered by.
Example:"available"
- Name
type
- Type
- string
- Description
The type of the add-on to be filtered by.
Example:"topUp"
- Name
recurrenceType
- Type
- string
- Description
The recurrence type of the add-on to be filtered by.
Example:"oneTime"
Response Schemas
Returns a dictionary with an items property that contains an array of add-ons.
- Name
object
- Type
- string
- Description
Type of object is always
list
.Allowed values:list
required- Name
items
- Type
- array
- Description
- List of objects of type `addon`.
required- Name
moreItemsAfter
- Type
- nullable string
- Description
A unique identifier to be used as
after
pagination parameter if more items are available sorted after the current batch of items.
required- Name
moreItemsBefore
- Type
- nullable string
- Description
A unique identifier to be used as
before
pagination parameter if more items are available sorted before the current batch of items.
required
Request
curl https://api.gigs.com/projects/{project}/addons \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "list",
"items": [
{
"object": "addon",
"id": "add_0SNlurA049MEWV4VxLfwJc7PJtHc",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"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"
}
],
"moreItemsAfter": null,
"moreItemsBefore": null
}