Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

The Octopus platform API methods referring to the Tickets module are described below. These methods let you, for example to obtain all issued tickets or generate a new one.

Services

GET - Get Services of Location

Returns the different validation methods or services defined in the Location indicated by the LocationId parameter.

https://<server-domainname>/rest/<version>/Location/{LocationId}/services


Parameters

TYPE

Parameter

Significance

Type

Required

Default

HEAD

Authorization

Bearer <API_KEY>

String

YES


GET

LocationId

Location identifier

String

YES



Response

HTTP CODE

Result

Response data

200

Ok


{
    "data": [
        {
            "id": 59219,
            "LocationId": "28XXX004",
            "typeId": "ttf",
            "name": "Ticket - 1 Hora",
            "price": 0,
            "status": 1,
            "onlineTime": 0,
            "expTime": 3600,
            "tpv": 0,
            "pms": 0,
            "showLogin": 1,
            "simDevices": 10,
            "maxUsers": 1,
            "loginMethod": "general",
            "download": 0,
            "upload": 0,
            "downrate": 0,
            "uprate": 0,
            "dailyLimit": 0,
            "validUntil": 15552000,
            "vip": 0,
            "validateEmail": 0,
            "deleted": 0,
            "withRegistration": 0,
            "macCaching": 0,
            "issueOrder": 0,
            "type": {
                "id": "ttf",
                "description": "Tiempo corrido",
                "timetofinish": true,
                "onlinetime": false,
                "timetolimit": false,
                "limittraffic": false
            }
        }
    ],
    "pagination": {
        "offset": 0,
        "limit": 5000,
        "rows": 9,
        "pages": 1,
        "currentPage": 1
    }
}


401

Unauthorized

Explanation of the error


The identifier or ID of each service must be sent as a parameter to create new tickets, as detailed in the following method.

  

Tickets

POST - Create a Ticket

Create a ticket for the Location indicated by the LocationId parameter. You must also indicate the service on which you want to create the Ticket. The service ID can be obtained using the method described above. The other parameters depend on the type of service selected, which must be indicated by the service parameter
.

https://<server-domainname>/rest/<version>/Location/{LocationId}/tickets


Parameters

TYPE

Parameter

Significance

Type

Required

Default

HEAD

Authorization

Bearer <API_KEY>

String

YES


GET

LocationId

Location identifier

String

YES


POST

start_time


date (ISO-8601)


Current date

POST

valid_until


date (ISO-8601)


Current date

POST

format


String (print, email)



POST

service

Service identifier

String(16)

YES


POST

userId

User identifier

String(64)



POST

numusers

Number of simultaneous users

integer




Response

HTTP CODE

Result

Response data

200

Ok


{
	"serial": "12389942",
	"radiusUser": "0123456789",
	"radiusPass": "VOID",
	"user": "Q4P68",
	"pass": "",
    "hotspotId": "28XXX004",
    "creationTime": "2018-01-12 12:41:51",
    "startTime": "2018-01-12 12:41:51",
    "tariffType": "ttl",
    "tariffName": "Variable ticket",
    "duration": "3600",
    "price": "0",
    "radiusId": "1",
    "numUsers": 4,
    "loginMethod": "general",
    "coding": "passcode",
    "realm": "28XXX004",
    "maccaching": "0"
}	



401

Unauthorized

Explanation of the error

   a

GET - Get Tickets of Location

Returns all the tickets that have been issued in the Location indicated by the LocationId parameter.

https://<server-domainname>/rest/<version>/Location/{LocationId}/tickets


Parameters

TYPE

Parameter

Significance

Type

Required

Default

HEAD

Authorization

Bearer <API_KEY>

String

YES


GET

LocationId

Location identifier

String

YES



Response

HTTP CODE

Result

Response data

200

Ok


{
    "data": [
        {
            "id": 190376,
            "LocationId": "28XXX002",
            "serial": "12391208",
            "creationTime": {
                "date": "2017-12-18 10:47:40.000000",
                "timezone_type": 3,
                "timezone": "Europe/Madrid"
            },
            "startTime": {
                "date": "2017-12-18 10:47:40.000000",
                "timezone_type": 3,
                "timezone": "Europe/Madrid"
            },
            "loginTime": null,
            "username": "NKQT2",
            "password": "",
            "realm": "REALM",
            "service": "ttf",
            "serviceName": "Ticket 2 horas",
            "cancelled": 0,
            "status": "new",
            "seconds": 7200,
            "salePrice": 0,
            "roomNumber": "0",
            "loginMethod": "general",
            "tpv": 0,
            "numUsers": 10,
            "userId": "apitest@apitest.es",
            "radiusId": 1,
            "coding": "passcode",
            "upload": null,
            "download": null,
            "sessionTime": null,
            "connections": null
        }
    ],
    "pagination": {
        "offset": 0,
        "limit": 5000,
        "rows": 9,
        "pages": 1,
        "currentPage": 1
    },
    "summary": 0,
    "timestamp": "2018-01-12 13:00:04"
}


401

Unauthorized

Explanation of the error



  • No labels