The Device resource
Devices are the phones or smartwatches that will be tied to a user’s plan.
Properties
- Name
object
- Type
- string
- Description
Type of object is always
device
.
- Name
id
- Type
- string
- Description
Unique identifier for the device.
Example:dev_0SNlurA049MEWV55CrA9qMvI2FVJ
- Name
metadata
- Type
- object
- Description
A set of key-value pairs, to store metadata related to the resource.
- Name
createdAt
- Type
- string
- Description
Time when the device was created.
Example:2021-02-14T19:38:34Z
- Name
imei
- Type
- nullable string
- Description
The IMEI (international mobile equipment identity) of the device if provided.
Example:492388841798923
- Name
model
- Type
- nullable object
- Description
- Name
name
- Type
- nullable string
- Description
An optional custom name for the device.
Example:Anna's iPhone 12 Pro
- Name
sims
- Type
- array
- Description
- List of SIMs added to this device.
- Name
user
- Type
- nullable object
- Description
Response
{
"object": "device",
"id": "dev_0SNlurA049MEWV55CrA9qMvI2FVJ",
"createdAt": "2021-02-14T19:38:34Z",
"imei": "492388841798923",
"model": {
"object": "deviceModel",
"id": "dmd_0SNlurA04OUskUGfGAn3Rh",
"brand": "Apple",
"name": "iPhone 12 Pro",
"simTypes": [
"eSIM",
"pSIM"
],
"type": "smartphone"
},
"name": "Anna's iPhone 12 Pro",
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"birthday": "2017-07-21",
"createdAt": "2021-01-21T19:38:34Z",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US"
}
}
List all device model brands
Returns a list of device model brands. The device model brands returned are sorted alphabetically.
Response Schemas
- Name
object
- Type
- string
- Description
List of device model brands.
required- Name
items
- Type
- array
- Description
A list of brands.
required
Request
curl https://api.gigs.com/deviceModelBrands \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "deviceModelBrands",
"items": [
"Apple"
]
}
Retrieve a device model
Retrieves the details of an existing device model.
Path Parameters
- Name
deviceModel
- Type
- string
- Description
The unique identifier for the device model.
Example:dmd_0SNlurA04OUskUGfGAn3Rh
required
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
deviceModel
.
required- Name
id
- Type
- string
- Description
Unique identifier for the deviceModel.
Example:dmd_0SNlurA04OUskUGfGAn3Rh
required- Name
brand
- Type
- string
- Description
The brand of the device model.
Example:Apple
required- Name
name
- Type
- string
- Description
The device model's name.
Example:iPhone 12 Pro
required- Name
simTypes
- Type
- array
- Description
List of SIM types supported by this device model.
Example:eSIM,pSIM
required- Name
type
- Type
- string
- Description
The type of the device model.
Example:smartphone
Allowed values:car, iot, laptop, router, smartphone, feature-phone, smartwatch, tablet, wearable, other
required
Request
curl https://api.gigs.com/deviceModels/{deviceModel} \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "deviceModel",
"id": "dmd_0SNlurA04OUskUGfGAn3Rh",
"brand": "Apple",
"name": "iPhone 12 Pro",
"simTypes": [
"eSIM",
"pSIM"
],
"type": "smartphone"
}
Search for device models
Searches for existing devices models matching the given parameters.
Body
- Name
imei
- Type
- string
- Description
The IMEI (international mobile equipment identity) of the corresponding device.
Example:492388841798923
required
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
list
.
required- Name
items
- Type
- array
- Description
- List of objects of type `deviceModel`.
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/deviceModels/search \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d "{\"imei\":\"492388841798923\"}"
Response
{
"object": "list",
"items": [
{
"object": "deviceModel",
"id": "dmd_0SNlurA04OUskUGfGAn3Rh",
"brand": "Apple",
"name": "iPhone 12 Pro",
"simTypes": [
"eSIM",
"pSIM"
],
"type": "smartphone"
}
],
"moreItemsAfter": null,
"moreItemsBefore": null
}
List all device models
Returns a list of device models. The models returned are sorted by creation date, with the most recently created models appearing first.
Query Parameters
- Name
type
- Type
- array
- Description
A comma-separated list of types to be filtered by.
Example:smartphone,tablet
- Name
brand
- Type
- array
- Description
A comma-separated list of brands to be filtered by.
Example:Apple,Samsung
- Name
simType
- Type
- array
- Description
A comma-separated list of SIM types to be filtered by.
Example:eSIM,pSIM
- 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
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
list
.
required- Name
items
- Type
- array
- Description
- List of objects of type `deviceModel`.
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/deviceModels \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "list",
"items": [
{
"object": "deviceModel",
"id": "dmd_0SNlurA04OUskUGfGAn3Rh",
"brand": "Apple",
"name": "iPhone 12 Pro",
"simTypes": [
"eSIM",
"pSIM"
],
"type": "smartphone"
}
],
"moreItemsAfter": null,
"moreItemsBefore": null
}
Retrieve a device
Retrieves the details of an existing device owned by the authenticated user.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required- Name
device
- Type
- string
- Description
The unique identifier for the device.
Example:dev_0SNlurA049MEWV55CrA9qMvI2FVJ
required
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
device
.
required- Name
id
- Type
- string
- Description
Unique identifier for the device.
Example:dev_0SNlurA049MEWV55CrA9qMvI2FVJ
required- Name
metadata
- Type
- object
- Description
A set of key-value pairs, to store metadata related to the resource.
required- Name
createdAt
- Type
- string
- Description
Time when the device was created.
Example:2021-02-14T19:38:34Z
required- Name
imei
- Type
- nullable string
- Description
The IMEI (international mobile equipment identity) of the device if provided.
Example:492388841798923
required- Name
model
- Type
- nullable object
- Description
required- Name
name
- Type
- nullable string
- Description
An optional custom name for the device.
Example:Anna's iPhone 12 Pro
required- Name
sims
- Type
- array
- Description
- List of SIMs added to this device.
required- Name
user
- Type
- nullable object
- Description
required
Request
curl https://api.gigs.com/projects/{project}/devices/{device} \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "device",
"id": "dev_0SNlurA049MEWV55CrA9qMvI2FVJ",
"metadata": {},
"createdAt": "2021-02-14T19:38:34Z",
"imei": "492388841798923",
"model": {
"object": "deviceModel",
"id": "dmd_0SNlurA04OUskUGfGAn3Rh",
"brand": "Apple",
"name": "iPhone 12 Pro",
"simTypes": [
"eSIM",
"pSIM"
],
"type": "smartphone"
},
"name": "Anna's iPhone 12 Pro",
"sims": [
{
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"createdAt": "2021-01-21T19:38:34Z",
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM"
}
],
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"createdAt": "2021-01-21T19:38:34Z",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US"
}
}
Delete a device
Retrieves the details of an existing device and deletes it.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required- Name
device
- Type
- string
- Description
The unique identifier for the device.
Example:dev_0SNlurA049MEWV55CrA9qMvI2FVJ
required
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
device
.
required- Name
id
- Type
- string
- Description
Unique identifier for the device.
Example:dev_0SNlurA049MEWV55CrA9qMvI2FVJ
required- Name
metadata
- Type
- object
- Description
A set of key-value pairs, to store metadata related to the resource.
required- Name
createdAt
- Type
- string
- Description
Time when the device was created.
Example:2021-02-14T19:38:34Z
required- Name
imei
- Type
- nullable string
- Description
The IMEI (international mobile equipment identity) of the device if provided.
Example:492388841798923
required- Name
model
- Type
- nullable object
- Description
required- Name
name
- Type
- nullable string
- Description
An optional custom name for the device.
Example:Anna's iPhone 12 Pro
required- Name
sims
- Type
- array
- Description
- List of SIMs added to this device.
required- Name
user
- Type
- nullable object
- Description
required
Request
curl https://api.gigs.com/projects/{project}/devices/{device} \
-X DELETE \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "device",
"id": "dev_0SNlurA049MEWV55CrA9qMvI2FVJ",
"metadata": {},
"createdAt": "2021-02-14T19:38:34Z",
"imei": "492388841798923",
"model": {
"object": "deviceModel",
"id": "dmd_0SNlurA04OUskUGfGAn3Rh",
"brand": "Apple",
"name": "iPhone 12 Pro",
"simTypes": [
"eSIM",
"pSIM"
],
"type": "smartphone"
},
"name": "Anna's iPhone 12 Pro",
"sims": [
{
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"createdAt": "2021-01-21T19:38:34Z",
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM"
}
],
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"createdAt": "2021-01-21T19:38:34Z",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US"
}
}
Update a device
Updates the given properties of an existing device.
Body
- Name
name
- Type
- nullable string
- Description
An optional custom name for the device.
Example:Anna's iPhone 12 Pro
- Name
metadata
- Type
- object
- Description
A set of key-value pairs, to store metadata related to the resource.
- Name
sims
- Type
- array
- Description
List of identifiers for all SIMs currently attached to the device.
- Name
user
- Type
- nullable string
- Description
Unique user identifier for the device owner.
Example:usr_0SNlurA049MEWV4OpCwsNyC9Kn2d
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required- Name
device
- Type
- string
- Description
The unique identifier for the device.
Example:dev_0SNlurA049MEWV55CrA9qMvI2FVJ
required
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
device
.
required- Name
id
- Type
- string
- Description
Unique identifier for the device.
Example:dev_0SNlurA049MEWV55CrA9qMvI2FVJ
required- Name
metadata
- Type
- object
- Description
A set of key-value pairs, to store metadata related to the resource.
required- Name
createdAt
- Type
- string
- Description
Time when the device was created.
Example:2021-02-14T19:38:34Z
required- Name
imei
- Type
- nullable string
- Description
The IMEI (international mobile equipment identity) of the device if provided.
Example:492388841798923
required- Name
model
- Type
- nullable object
- Description
required- Name
name
- Type
- nullable string
- Description
An optional custom name for the device.
Example:Anna's iPhone 12 Pro
required- Name
sims
- Type
- array
- Description
- List of SIMs added to this device.
required- Name
user
- Type
- nullable object
- Description
required
Request
curl https://api.gigs.com/projects/{project}/devices/{device} \
-X PATCH \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d "{\"name\":\"Anna's iPhone 12 Pro\",\"metadata\":{},\"sims\":[\"sim_0SNlurA049MEWV1BAAmWZULA4lf6\"],\"user\":\"usr_0SNlurA049MEWV4OpCwsNyC9Kn2d\"}"
Response
{
"object": "device",
"id": "dev_0SNlurA049MEWV55CrA9qMvI2FVJ",
"metadata": {},
"createdAt": "2021-02-14T19:38:34Z",
"imei": "492388841798923",
"model": {
"object": "deviceModel",
"id": "dmd_0SNlurA04OUskUGfGAn3Rh",
"brand": "Apple",
"name": "iPhone 12 Pro",
"simTypes": [
"eSIM",
"pSIM"
],
"type": "smartphone"
},
"name": "Anna's iPhone 12 Pro",
"sims": [
{
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"createdAt": "2021-01-21T19:38:34Z",
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM"
}
],
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"createdAt": "2021-01-21T19:38:34Z",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US"
}
}
Search for devices
Searches for existing devices matching the given parameters. The search will only return factory devices not yet assigned to any user, or devices already owned by the current user.
Body
- Name
imei
- Type
- string
- Description
The IMEI (international mobile equipment identity) of the device.
Example:492388841798923
required
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
list
.
required- Name
items
- Type
- array
- Description
- List of objects of type `device`.
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}/devices/search \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d "{\"imei\":\"492388841798923\"}"
Response
{
"object": "list",
"items": [
{
"object": "device",
"id": "dev_0SNlurA049MEWV55CrA9qMvI2FVJ",
"metadata": {},
"createdAt": "2021-02-14T19:38:34Z",
"imei": "492388841798923",
"model": {
"object": "deviceModel",
"id": "dmd_0SNlurA04OUskUGfGAn3Rh",
"brand": "Apple",
"name": "iPhone 12 Pro",
"simTypes": [
"eSIM",
"pSIM"
],
"type": "smartphone"
},
"name": "Anna's iPhone 12 Pro",
"sims": [
{
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"createdAt": "2021-01-21T19:38:34Z",
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM"
}
],
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"createdAt": "2021-01-21T19:38:34Z",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US"
}
}
],
"moreItemsAfter": null,
"moreItemsBefore": null
}
List all devices
Returns a list of devices. The devices returned are sorted by creation date, with the most recently created devices appearing first.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required
Query Parameters
- Name
sim
- Type
- string
- Description
The unique identifier for the sim to be filtered by.
Example:sim_0SNlurA049MEWV1BAAmWZULA4lf6
- Name
user
- Type
- string
- Description
The unique identifier for the user to be filtered by.
Example:usr_0SNlurA049MEWV4OpCwsNyC9Kn2d
- 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
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
list
.
required- Name
items
- Type
- array
- Description
- List of objects of type `device`.
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}/devices \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "list",
"items": [
{
"object": "device",
"id": "dev_0SNlurA049MEWV55CrA9qMvI2FVJ",
"metadata": {},
"createdAt": "2021-02-14T19:38:34Z",
"imei": "492388841798923",
"model": {
"object": "deviceModel",
"id": "dmd_0SNlurA04OUskUGfGAn3Rh",
"brand": "Apple",
"name": "iPhone 12 Pro",
"simTypes": [
"eSIM",
"pSIM"
],
"type": "smartphone"
},
"name": "Anna's iPhone 12 Pro",
"sims": [
{
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"createdAt": "2021-01-21T19:38:34Z",
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM"
}
],
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"createdAt": "2021-01-21T19:38:34Z",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US"
}
}
],
"moreItemsAfter": null,
"moreItemsBefore": null
}
Create a device
Creates a new device with the given parameters.
Body
- Name
imei
- Type
- string
- Description
The IMEI (international mobile equipment identity) of the device.
Example:492388841798923
required- Name
user
- Type
- nullable string
- Description
Unique user identifier for the device owner.
Example:usr_0SNlurA049MEWV4OpCwsNyC9Kn2d
- Name
sims
- Type
- nullable array
- Description
List of identifiers for all SIMs to attach to the device.
- Name
name
- Type
- nullable string
- Description
An optional custom name for the device.
Example:Anna's iPhone 12 Pro
- Name
metadata
- Type
- object
- Description
A set of key-value pairs, to store metadata related to the resource.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
device
.
required- Name
id
- Type
- string
- Description
Unique identifier for the device.
Example:dev_0SNlurA049MEWV55CrA9qMvI2FVJ
required- Name
metadata
- Type
- object
- Description
A set of key-value pairs, to store metadata related to the resource.
required- Name
createdAt
- Type
- string
- Description
Time when the device was created.
Example:2021-02-14T19:38:34Z
required- Name
imei
- Type
- nullable string
- Description
The IMEI (international mobile equipment identity) of the device if provided.
Example:492388841798923
required- Name
model
- Type
- nullable object
- Description
required- Name
name
- Type
- nullable string
- Description
An optional custom name for the device.
Example:Anna's iPhone 12 Pro
required- Name
sims
- Type
- array
- Description
- List of SIMs added to this device.
required- Name
user
- Type
- nullable object
- Description
required
Request
curl https://api.gigs.com/projects/{project}/devices \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d "{\"imei\":\"492388841798923\",\"user\":\"usr_0SNlurA049MEWV4OpCwsNyC9Kn2d\",\"sims\":[\"sim_0SNlurA049MEWV1BAAmWZULA4lf6\"],\"name\":\"Anna's iPhone 12 Pro\",\"metadata\":{}}"
Response
{
"object": "device",
"id": "dev_0SNlurA049MEWV55CrA9qMvI2FVJ",
"metadata": {},
"createdAt": "2021-02-14T19:38:34Z",
"imei": "492388841798923",
"model": {
"object": "deviceModel",
"id": "dmd_0SNlurA04OUskUGfGAn3Rh",
"brand": "Apple",
"name": "iPhone 12 Pro",
"simTypes": [
"eSIM",
"pSIM"
],
"type": "smartphone"
},
"name": "Anna's iPhone 12 Pro",
"sims": [
{
"object": "sim",
"id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"metadata": {},
"createdAt": "2021-01-21T19:38:34Z",
"iccid": "89883070000007537119",
"provider": "p9",
"status": "inactive",
"type": "eSIM"
}
],
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"createdAt": "2021-01-21T19:38:34Z",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US"
}
}