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


Guest Account

Create and manage guest accounts

Create Guestuser(s)

POST /ext/{siteid}/api/v1/guestuser/

Body Required

  • duration_val integer Required

    Allowed duration actual value

  • password string Required

    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)

  • 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 integer Required

    Max devices allowed in this package

  • Set data to be unlimited for guestuser

  • duration_type integer Required

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

  • bytes_t integer

    Data Limit ( only if data_limit is True)

  • username string Required

    username

Responses

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

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

Body Required

  • duration_val integer Required

    Allowed duration actual value

  • password string Required

    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)

  • 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 integer Required

    Max devices allowed in this package

  • Set data to be unlimited for guestuser

  • duration_type integer Required

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

  • bytes_t integer

    Data Limit ( only if data_limit is True)

  • username string Required

    username

Responses

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

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"

Voucher

Create and manage Vouchers

Create Voucher(s)

POST /ext/{siteid}/api/v1/voucher/

Body Required

  • notes string

    Internal comments

  • Set data to be unlimited in voucher

  • Allowed duration actual value

  • speed_ul integer

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

  • Set speed to be unlimited in voucher

  • price number

    Price in decimal

  • num_to_create integer Required

    Number of vouchers to create

  • speed_dl integer

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

  • batchid integer

    Optional Batch ID

  • 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 integer Required

    Max devices allowed in this package

Responses

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

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

  • Set data to be unlimited in voucher

  • Allowed duration actual value

  • speed_ul integer

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

  • 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)

  • 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 integer Required

    Max devices allowed in this package

Responses

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

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"

Guest

Get details about the guest data collected

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": "2023-05-04T09:42:00+00:00",
      "last_seen_at": "2023-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"
    }
  ]
}

Payments

Get details about the payments collected from Guests.

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": "2023-05-04T09:42:00+00:00",
          "recurring_freq": "string",
          "active": true,
          "next_charge_currency": {},
          "next_charge_amount": {},
          "last_paid_on": "2023-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

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
    }
  ]
}