passagetries

API-key level needed: Change / showByCardnumber

Create passage

Creates a passage through a specific card reader. This is the same thing as if the card was swiped in a physical card reader. 

Request

Example:

 

POST:APIURL/passagetries.xml
apikey=338934897438
cardnumber=12345
cardreaderid=1
opengate=false

 

Parameters

TagExampleData typeDescription
cardnumber57114String

Card number to create passage from

cardreaderid14IDId of card reader
opengatefalseBooleanShould physical gate be opened by successful passage
manualtrueBooleanCircumvents the card readers conversion of the card number
printticketfalseBooleanShould tickets be printed if entry leads to customer being marked as arrived for one or more class. Default false and only works for network connected printers connected to the card reader in BRP

 

Response

A passage attempt. Please note that person/product/subscription/valuecard can be empty. For example a passage with an anonymous discount card will only have values for valuecard and product.

 

TagExampleDate typeDescription

id

<id>23</id>IDUnique ID

resultcode

<resultcode>100</resultcode>IntegerResult code, 0 = OK, for others pelase see result message field

resultmessage

<resultmessage>Unknown card number, id-nr=1234</resultmesage>StringInformation about the passage, for example number of passages left on card, error messages etc.

person

<person>...</person>PersonThe person affiliated with the passage. See persons.

product

<product>...</product>ProductID and name of product used for the passage.

subscription

<subscription>...</subscription>SubscriptionThe subscription/membership used for the passage. See subscriptions.
valuecard<valuecard>...</valuecard>Value cardThe value card used for the passage. See Valuecards.
created<created>...</created>TimeThe time of entry
newvisit<newvisit>true</newvisit>BooleanIf the passage was the first entry of the day (passage in a turnstyle for example) or not (i.e. an internal card reader by a locker room)
consumecarrier<consumecarrier>true</consumecarrier>BooleanShould the carrier be consumed. Usually RFID-bracelets containing valuecards or entries. This could instruct the card reader to keep the data carrier.
<passagetry>
    <id>618</id>
    <result>Unknown card number, id-nr=1234</result>
    <message>id-nr=1234</message>
    <person></person>
    <product></product>
    <subscription></subscription>
    <valuecard></valuecard>
    <created>
        <timepoint>
            <timestamp>1371633226.454</timestamp>
            <datetime>2013-06-19 11:13</datetime>
            <date>2013-06-19</date>
            <time>11:13</time>
        </timepoint>
    </created>
    <newvisit>false</newvisit>
	<consumecarrier>true</consumecarrier>
</passagetry>

Error codes

CodeReason
0OK
100Unknown card number
101Missing valid subscription
102Person suspended
103Unpaid invoice
104Unpaid invoice
105Already passed
106Error
107Time out
108Undone
109Unable to book class
110Maximum visit length exceeded
111Unpaid products
112Wrong time
113Missing membership
114Prepaid amount left
115Entry is consumed
116Too soon since last passage
117Incorrect fingerprint
118Waiting for fingerprint
119Waiting for feedback
120Passage not allowed
121Could not write locker data
122Too many inside
123Unsigned contract
400License missing for addon feature