API
1.0

This is the documentation for version 1.0 of the API. Last update on Jan 8, 2022.

Base URL
https://api.spotipo.com

Authentication

Api key auth (http_api_key)

Send an authentication token in the Authentication-Token header to authenticate with the API.


Getting started

Before using the API you need yo get an API key by logging to Spotipo, and navigate to Account -> API Keys


Create Guestuser(s)

POST /ext/{siteid}/api/v1/guestuser/
Body Required
  • duration_val Required / integer

    Allowed duration actual value

  • password Required / string

    password

  • bytes_type integer

    Data Limit type (1,'Total'),(2,'Daily'),(3,'Weekly'),(4,'Monthly') ( only if data_limit is True)

  • speed_ul integer

    Upload speed , 0 for unlimited ( only if speed_limit is True)

  • unlimited_speed boolean

    Set speed to be unlimited for guestuser

  • speed_dl integer

    Download speed , 0 for unlimited ( only if speed_limit is True)

  • notes string

    Internal comments

  • num_devices Required / integer

    Max devices allowed in this package

  • unlimited_data boolean

    Set data to be unlimited for guestuser

  • duration_type Required / integer

    Type for time duration (1,'Minutes'),(2,'Hours'),(3,'Days')

  • bytes_t integer

    Data Limit ( only if data_limit is True)

  • username Required / string

    username

Responses
  • 200

    Success

POST /ext/{siteid}/api/v1/guestuser/
curl \
 -X POST https://api.spotipo.com/ext/{siteid}/api/v1/guestuser/ \
 -H "Authentication-Token: $API_KEY" \
 -d '{"duration_val":42,"password":"string","bytes_type":42,"speed_ul":42,"unlimited_speed":true,"speed_dl":42,"notes":"string","num_devices":42,"unlimited_data":true,"duration_type":42,"bytes_t":42,"username":"string"}'
Request example
{
  "duration_val": 42,
  "password": "string",
  "bytes_type": 42,
  "speed_ul": 42,
  "unlimited_speed": true,
  "speed_dl": 42,
  "notes": "string",
  "num_devices": 42,
  "unlimited_data": true,
  "duration_type": 42,
  "bytes_t": 42,
  "username": "string"
}

Return a guestuser via username

GET /ext/{siteid}/api/v1/guestuser/u/{username}
Responses
  • 200

    Success

GET /ext/{siteid}/api/v1/guestuser/u/{username}
curl \
 -X GET https://api.spotipo.com/ext/{siteid}/api/v1/guestuser/u/{username} \
 -H "Authentication-Token: $API_KEY"

Update a guestuser via username

PUT /ext/{siteid}/api/v1/guestuser/u/{username}

Note all the devices connected to this account will be disconnected

Headers
  • X-Fields string(mask)

    An optional fields mask

Body Required
  • duration_val Required / integer

    Allowed duration actual value

  • password Required / string

    password

  • bytes_type integer

    Data Limit type (1,'Total'),(2,'Daily'),(3,'Weekly'),(4,'Monthly') ( only if data_limit is True)

  • speed_ul integer

    Upload speed , 0 for unlimited ( only if speed_limit is True)

  • unlimited_speed boolean

    Set speed to be unlimited for guestuser

  • speed_dl integer

    Download speed , 0 for unlimited ( only if speed_limit is True)

  • notes string

    Internal comments

  • num_devices Required / integer

    Max devices allowed in this package

  • unlimited_data boolean

    Set data to be unlimited for guestuser

  • duration_type Required / integer

    Type for time duration (1,'Minutes'),(2,'Hours'),(3,'Days')

  • bytes_t integer

    Data Limit ( only if data_limit is True)

  • username Required / string

    username

Responses
  • 200 object

    Success

    • name object

      Guest name

    • duration_val Required / integer

      Allowed duration actual value

    • email string

      Email

    • password Required / string

      password

    • bytes_type integer

      Data Limit type (1,'Total'),(2,'Daily'),(3,'Weekly'),(4,'Monthly') ( only if data_limit is True)

    • speed_ul integer

      Upload speed , 0 for unlimited ( only if speed_limit is True)

    • unlimited_speed boolean

      Set speed to be unlimited for guestuser

    • auths array[object]
    • speed_dl integer

      Download speed , 0 for unlimited ( only if speed_limit is True)

    • id integer
    • notes string

      Internal comments

    • num_devices Required / integer

      Max devices allowed in this package

    • unlimited_data boolean

      Set data to be unlimited for guestuser

    • duration_type Required / integer

      Type for time duration (1,'Minutes'),(2,'Hours'),(3,'Days')

    • bytes_t integer

      Data Limit ( only if data_limit is True)

    • username Required / string

      username

    • status object

      Guest account status [unused|inuse|expired]

PUT /ext/{siteid}/api/v1/guestuser/u/{username}
curl \
 -X PUT https://api.spotipo.com/ext/{siteid}/api/v1/guestuser/u/{username} \
 -H "Authentication-Token: $API_KEY" \
 -H "X-Fields: string" \
 -d '{"duration_val":42,"password":"string","bytes_type":42,"speed_ul":42,"unlimited_speed":true,"speed_dl":42,"notes":"string","num_devices":42,"unlimited_data":true,"duration_type":42,"bytes_t":42,"username":"string"}'
Request example
# Headers
X-Fields: string

# Payload
{
  "duration_val": 42,
  "password": "string",
  "bytes_type": 42,
  "speed_ul": 42,
  "unlimited_speed": true,
  "speed_dl": 42,
  "notes": "string",
  "num_devices": 42,
  "unlimited_data": true,
  "duration_type": 42,
  "bytes_t": 42,
  "username": "string"
}
Response example (200)
{
  "name": {},
  "duration_val": 42,
  "email": "string",
  "password": "string",
  "bytes_type": 42,
  "speed_ul": 42,
  "unlimited_speed": true,
  "auths": [
    {
      "id": 42,
      "type": "string",
      "data_used": "string",
      "hostname": {},
      "devicedata": {},
      "online": {},
      "last_seen_at": {},
      "time_used": "string",
      "mac": {}
    }
  ],
  "speed_dl": 42,
  "id": 42,
  "notes": "string",
  "num_devices": 42,
  "unlimited_data": true,
  "duration_type": 42,
  "bytes_t": 42,
  "username": "string",
  "status": {}
}

Delete Single Guestuser via username

DELETE /ext/{siteid}/api/v1/guestuser/u/{username}
Responses
  • 200

    Success

DELETE /ext/{siteid}/api/v1/guestuser/u/{username}
curl \
 -X DELETE https://api.spotipo.com/ext/{siteid}/api/v1/guestuser/u/{username} \
 -H "Authentication-Token: $API_KEY"

Create Voucher(s)

POST /ext/{siteid}/api/v1/voucher/
Body Required
  • notes string

    Internal comments

  • unlimited_data boolean

    Set data to be unlimited in voucher

  • duration_val integer

    Allowed duration actual value

  • speed_ul integer

    Upload speed , 0 for unlimited ( only if speed_limit is True)

  • unlimited_speed boolean

    Set speed to be unlimited in voucher

  • price number

    Price in decimal

  • num_to_create Required / integer

    Number of vouchers to create

  • speed_dl integer

    Download speed , 0 for unlimited ( only if speed_limit is True)

  • batchid integer

    Optional Batch ID

  • duration_type integer

    Type for time duration (1,'Minutes'),(2,'Hours'),(3,'Days')

  • bytes_t integer

    Total allowed data in MB, 0 for unlimited ( only if data_limit is True)

  • num_devices Required / integer

    Max devices allowed in this package

Responses
  • 200

    Success

POST /ext/{siteid}/api/v1/voucher/
curl \
 -X POST https://api.spotipo.com/ext/{siteid}/api/v1/voucher/ \
 -H "Authentication-Token: $API_KEY" \
 -d '{"notes":"string","unlimited_data":true,"duration_val":42,"speed_ul":42,"unlimited_speed":true,"price":42.0,"num_to_create":42,"speed_dl":42,"batchid":42,"duration_type":42,"bytes_t":42,"num_devices":42}'
Request example
{
  "notes": "string",
  "unlimited_data": true,
  "duration_val": 42,
  "speed_ul": 42,
  "unlimited_speed": true,
  "price": 42.0,
  "num_to_create": 42,
  "speed_dl": 42,
  "batchid": 42,
  "duration_type": 42,
  "bytes_t": 42,
  "num_devices": 42
}

Return a voucher

GET /ext/{siteid}/api/v1/voucher/{voucherid}
Responses
  • 200

    Success

GET /ext/{siteid}/api/v1/voucher/{voucherid}
curl \
 -X GET https://api.spotipo.com/ext/{siteid}/api/v1/voucher/{voucherid} \
 -H "Authentication-Token: $API_KEY"

Update Voucher

PUT /ext/{siteid}/api/v1/voucher/{voucherid}
Body Required
  • notes string

    Internal comments

  • unlimited_data boolean

    Set data to be unlimited in voucher

  • duration_val integer

    Allowed duration actual value

  • speed_ul integer

    Upload speed , 0 for unlimited ( only if speed_limit is True)

  • unlimited_speed boolean

    Set speed to be unlimited in voucher

  • price number

    Price in decimal

  • speed_dl integer

    Download speed , 0 for unlimited ( only if speed_limit is True)

  • duration_type integer

    Type for time duration (1,'Minutes'),(2,'Hours'),(3,'Days')

  • bytes_t integer

    Total allowed data in MB, 0 for unlimited ( only if data_limit is True)

  • num_devices Required / integer

    Max devices allowed in this package

Responses
  • 200

    Success

PUT /ext/{siteid}/api/v1/voucher/{voucherid}
curl \
 -X PUT https://api.spotipo.com/ext/{siteid}/api/v1/voucher/{voucherid} \
 -H "Authentication-Token: $API_KEY" \
 -d '{"notes":"string","unlimited_data":true,"duration_val":42,"speed_ul":42,"unlimited_speed":true,"price":42.0,"speed_dl":42,"duration_type":42,"bytes_t":42,"num_devices":42}'
Request example
{
  "notes": "string",
  "unlimited_data": true,
  "duration_val": 42,
  "speed_ul": 42,
  "unlimited_speed": true,
  "price": 42.0,
  "speed_dl": 42,
  "duration_type": 42,
  "bytes_t": 42,
  "num_devices": 42
}

Delete Single Voucher

DELETE /ext/{siteid}/api/v1/voucher/{voucherid}
Responses
  • 200

    Success

DELETE /ext/{siteid}/api/v1/voucher/{voucherid}
curl \
 -X DELETE https://api.spotipo.com/ext/{siteid}/api/v1/voucher/{voucherid} \
 -H "Authentication-Token: $API_KEY"

Return all the guests for a site.

GET /ext/{siteid}/api/v1/guest/
Responses
GET /ext/{siteid}/api/v1/guest/
curl \
 -X GET https://api.spotipo.com/ext/{siteid}/api/v1/guest/ \
 -H "Authentication-Token: $API_KEY"
Response example (200)
{
  "metadata": {
    "page": 42,
    "per_page": 42,
    "total_count": 42,
    "page_count": 42,
    "links": []
  },
  "items": [
    {
      "id": 42,
      "newsletter": true,
      "phonenumber": "string",
      "gender": "string",
      "name": {},
      "created_at": "2022-05-04T09:42:00+00:00",
      "last_seen_at": "2022-05-04T09:42:00+00:00",
      "guestsessions": [],
      "dob": {},
      "customfields": [
        {
          "fieldval": "string",
          "id": 42,
          "fieldname": "string"
        }
      ],
      "loginauths": [
        {
          "id": 42,
          "type": "string",
          "data_used": "string",
          "hostname": {},
          "devicedata": {},
          "online": {},
          "last_seen_at": {},
          "time_used": "string",
          "mac": {}
        }
      ],
      "consent": true,
      "email": "string"
    }
  ]
}

Return all the paymentaccounts for a site

GET /ext/{siteid}/api/v1/payments/accounts

Accepts the format ?page=1&per_page=10&search=&fromdate=&todate=
date should be DD-MM-YYYY format

Responses
GET /ext/{siteid}/api/v1/payments/accounts
curl \
 -X GET https://api.spotipo.com/ext/{siteid}/api/v1/payments/accounts \
 -H "Authentication-Token: $API_KEY"
Response example (200)
{
  "metadata": {
    "page": 42,
    "per_page": 42,
    "total_count": 42,
    "page_count": 42,
    "links": []
  },
  "items": [
    {
      "id": 42,
      "endtime": {},
      "firstname": "string",
      "status": {},
      "auths": [
        {
          "id": 42,
          "type": "string",
          "data_used": "string",
          "hostname": {},
          "devicedata": {},
          "online": {},
          "last_seen_at": {},
          "time_used": "string",
          "mac": {}
        }
      ],
      "lastname": "string",
      "phonenumber": "string",
      "recurringpayments": [
        {
          "id": 42,
          "next_payment_on": "2022-05-04T09:42:00+00:00",
          "recurring_freq": "string",
          "active": true,
          "next_charge_currency": {},
          "next_charge_amount": {},
          "last_paid_on": "2022-05-04T09:42:00+00:00"
        }
      ],
      "transactions": [
        {
          "id": 42,
          "starttime": {},
          "endtime": {},
          "status": {},
          "comments": "string",
          "amount": "string",
          "email": "string",
          "name": {},
          "num_devices": 42
        }
      ],
      "email": "string",
      "starttime": {}
    }
  ]
}

Return all the transactions for a site.

GET /ext/{siteid}/api/v1/payments/transactions

Accepts the format ?page=1&per_page=10&search=&fromdate=&todate=date should be in DD-MM-YYYY format

Responses
  • 200 object

    Success

    • metadata object
    • items array[object]
      • id integer
      • starttime object

        Start time for this transaction

      • endtime object

        End time for this transaction

      • status object

        Status of this transaction free|payment_failed|payment_success|paid_and_used|refunded|unknown

      • comments string

        Additional Info about this transaction

      • amount string

        Amount charged

      • email string

        Email address of guest

      • name object

        Name of the package bought

      • num_devices integer

        Number of Devices supported

GET /ext/{siteid}/api/v1/payments/transactions
curl \
 -X GET https://api.spotipo.com/ext/{siteid}/api/v1/payments/transactions \
 -H "Authentication-Token: $API_KEY"
Response example (200)
{
  "metadata": {
    "page": 42,
    "per_page": 42,
    "total_count": 42,
    "page_count": 42,
    "links": []
  },
  "items": [
    {
      "id": 42,
      "starttime": {},
      "endtime": {},
      "status": {},
      "comments": "string",
      "amount": "string",
      "email": "string",
      "name": {},
      "num_devices": 42
    }
  ]
}