| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533 |
- The following is a description of the proposed protocol for communication between the Client Web Server and the Back End DataBase.
- Optional items are enclosed in []'s, Manditory items are in ()'s, Alternative options are seperated by a |.
- <string> represents an arbitrary string (i.e. 'Abc Def'), <#> a number (i.e. '1234'), <date> a Date Time (i.e. '2004-01-01 15:33:01').
- Characters preceded by a \ are meant as a literal (i.e. \[ is meant as the '[' character). All field items must be less than 256 characters.
- The only time this notation is abused is for requests that return multiple (variable number) of items, such as the GetPassesOnCard and GetCard functions.
- When there is more than one item being returned, additional fields will have a [<i>] suffix, where <i> denotes the i'th item, starting at 1 from from the first
- item using the [<i>] notation. The order in which they are returned is arbitrary but fixed.
- example:
- A GetCard is sent, the following might be returned if there are 3 cards associated with the account:
- Response=success
- MagStripe=12345678
- RFSite=0
- RFID=0
- Comment=test card
- LastUsed=2010-01-01
- FirstUsed=
- Issued=2010-01-01
- NCard=3
- MagStripe[1]=12345679
- RFSite[1]=0
- RFID[1]=0
- Comment[1]=test card
- LastUsed[1]=2010-01-01
- FirstUsed[1]=
- Issued[1]=2010-01-01
- MagStripe[2]=12345679
- RFSite[2]=0
- RFID[2]=0
- Comment[2]=test card
- LastUsed[2]=2010-01-01
- FirstUsed[2]=
- Issued[2]=2010-01-01
- A client wishing to make a transaction must send an initiate request and take the UserToken and ServerToken returned to create a TransactionToken and ServerTransactionToken respectively.
- The TransactionToken and ServerTransactionToken can only be used once per transaction.
- '-->' denote messages FROM the (web) client TO the (db) server.
- '<--' denote messages TO the (web) client FROM the (db) server.
-
- Transaction Initiation Request
- ------------------------------
- -->
- MessageType=initiate
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- UserToken=<string>
- ServerToken=<string>
- HashAlgorithm=(md5|sha1)
- )
- Broadly speaking, there are two types of functions, 'user' functions and
- 'admin' functions, where the latter has a prefix of 'Admin' as can be seen
- below in the function list.
- Function List
- -------------
- AddUser
- GetUser
- SetUser
- GetCard
- GetCards
- AddCard
- RemoveCard
- RemovePass
- GetPassesOnCard
- GetPass
- TransferPass
- AddPass
- SendEmailVerification
- SendEmailPasswordReset
- PasswordReset
- Log
- GetCardPricePoints
- AdminGetCard
- AdminGetCards
- AdminGetPass
- AdminGetUser
- AdminGetAdmin
- AdminGetPassesOnCard
- AdminGetPendingQueue
- AdminProcessPendingQueue
- AdminRemovePendingQueue
- AdminCreateCardBlock
- AdminCreateCard
- AdminSetUser
- AdminSetAdmin
- AdminAddPass
- AdminAddCard
- AdminAddUser
- AdminAddAdmin
- AdminRemovePass
- AdminRemovePasses
- AdminRemoveCard
- AdminRemoveUser
- AdminRemoveAdmin
- AdminTransferCard
- AdminTransferPass
- AdminGetPassOptions
- AdminAddCardToUser
- AdminRemoveCardFromUser
- AdminGetAdminPermissions
- AdminAddAdminPermissions
- AdminRemoveAdminPermissions
- AdminAddAdminApiPermissions
- AdminRemoveAdminApiPermissions
- AdminSetAdminApiPermissions
- AdminGetCustomCard
- AdminGetAdmins
- AdminSearchCards
- AdminSearchUsers
- AdminSearchAdmins
- Transaction Requests
- -------------------
- -->
- MessageType=request
- Function=(AddUser|GetUser|SetUser|GetCard|GetCards|AddCard|RemoveCard|RemovePass|GetPassesOnCard|GetPass|TransferPass|AddPass|SendEmailVerification|SendEmailPasswordReset|PasswordReset|Log|GetCardPricePoints)
- TransactionToken=<string>
- ServerTransactionToken=<string>
- <FUNCTION PAYLOAD>
- <--
- Response=(sucess|fail)
- [Reason=<string>]
- <RESPONSE PAYLOAD>
- Comments:
- A client wishing to make a transaction/request must first send a POST message to the server with the MessageType set to 'initiate'.
- After receiving the UserToken, ServerToken and HashAlgorithm, the client must send back a ServerToken created from hashing the string
- produced by concatenating the ServePassword and the ServerToken. i.e. ServerTransactionToken = hash( ServerPassword + ServerToken ).
- The ServerPassword is the password shared by the two parties at the endpoints
- of the API.
- If the function is not one of 'AddUser', 'SendEmailVerification', 'SendEmailPasswordReset', 'PasswordReset' or 'Log', then the TransactionToken
- must also be provided. The TransactionToken is created from the hash of the
- user's password as its stored in the database concatenated with the
- UserToken. i.e. TransactionToken = hash( hash(UserPassword) + UserToken ) if
- the function is a user function. If the Function is an admin function, then
- the TransactionToken is created from teh hash of the admin's password as it is
- stored in the database concatenated with the UserToken. i.e. TransactionToken
- = hash( hash(AdminPassword) + UserToken ).
- The Transaction Token and Server Transaction Token
- will only be valid for 2 minutes after the 'initiate' request. The Transaction Token and Server Transaction Token cannot be re-used after
- a transaction that has successfully iliicited a response (either 'success' or 'fail'). Any new request must go through another challenge response (request a token
- through an 'initiate', then provide a valid session token).
- SHORTHANDS
- ----------
- Here are some commonly used shorthands:
- CARD_CREDENTIAL=
- (
- CardId=<#> |
- (
- (MagTrack=<#>)
- MagStripe=<#> |
- MagToken=<string>
- ) |
- (
- [RFSite=<#>]
- RFID=<#> |
- RFIDToken=<string>
- ) |
- (
- (
- (MagTrack=<#>)
- MagStripe=<#> |
- MagToken=<string>
- )
- (
- [RFSite=<#>]
- RFID=<#> |
- RFIDToken=<string>
- )
- )
- )
-
- USER_CREDENTIAL=
- (
- UserId=<#> |
- UserName=<string>
- )
- ADMIN_CREDENTIAL=
- (
- AdminUserId=<#> |
- AdminUserName=<string>
- )
- GROUP_CREDENTIAL=
- (
- GroupId=<#> |
- GroupName=<string>
- )
- For example, the card credential can consist of a CardId or a
- MagStripe/MagToken, or a RFID/RFIDToken or a combination of
- MagStripe/MagToken and RFID/RFIDToken.
- ADMIN_CREDENTIAL and USER_CREDENTIAL are the same but will look up their
- values in different tables depending on context and are provided for clarity.
- UserId will lookup the id in the admins table for admin functions whereas UserId will lookup
- userid in the users table for user functions.
- ACL
- ---
- All functions are under an access control list. All requests are checked
- for proper access and will be denied execution if the requesting user or admin
- does not have proper permissions. All subsequent create, read, update or
- delete (crud) requests will fail if the user or admin does not have access to
- the appropriate table.
- ACL tables are currently rlapi_aros, rlapi_acos and rlapi_aros_acos.
-
- FUNCTIONS
- ---------
- AddUser
- -------
- -->
- MessageType=request
- Function=AddUser
- ServerTransactionToken=<string>
- UserName=<username>
- PasswordHash=<string>
- RegistrationToken=<string>
- [Firstname=<string>]
- [Lastname=<string>]
- [Phone=<string>]
- [Email=<string>]
- [Address=<string>]
- [City=<string>]
- [State=<string>]
- [ZIP=<string>]
- [ShippingFirstname=<string>]
- [ShippingLastname=<string>]
- [ShippingAddress=<string>]
- [ShippingCity=<string>]
- [ShippingState=<string>]
- [ShippingZIP=<string>]
- [Comment=<string>]
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- UserId=<#>
- )
- Comments:
- The request will fail if the UserName already exists.
- The RegistrationToken must be from a SendEmailVerification request.
-
- The RegistrationToken will only be valid for 1 day after the registration
- request has been initiated.
- GetUser
- -------
- -->
- MessageType=request
- Function=GetUser
- TransactionToken=<string>
- ServerTransactionToken=<string>
- (
- UserId=<#> |
- UserName=<string>
- )
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- UserId=<#>
- UserName=<string>
- FirstName=<string>
- LastName=<string>
- Phone=<string>
- Email=<string>
- Address=<string>
- City=<string>
- State=<string>
- ZIP=<string>
- Comment=<string>
- )
- Comments:
- SetUser
- -------
- -->
- MessageType=request
- Function=SetUser
- TransactionToken=<string>
- ServerTransactionToken=<string>
- (
- UserId=<#> |
- UserName=<string>
- )
- [PasswordHash=<string>]
- [FirstName=<string>]
- [LastName=<string>]
- [Phone=<string>]
- [Email=<string>]
- [Address=<string>]
- [City=<string>]
- [State=<string>]
- [ZIP=<string>]
- [ShippingFirstname=<string>]
- [ShippingLastname=<string>]
- [ShippingAddress=<string>]
- [ShippingCity=<string>]
- [ShippingState=<string>]
- [ShippingZIP=<string>]
- [Comment=<string>]
- <--
- Response=(success|fail)
- [Reason=<string>]
- Comments:
- PasswordHash is the sha1 digest of the user specified Password.
- GetCard
- -------
- -->
- MessageType=request
- Function=GetCard
- TransactionToken=<string>
- ServerTransactionToken=<string>
- (
- UserId=<#> |
- UserName=<string>
- )
- (
- MagStripe=<string> |
- [RFSite=<#>]
- RFID=<#> |
- CardId=<#>
- )
- <--
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- MagStripe=(<#>|)
- RFSite=(<#>|)
- RFID=(<#>|)
- CardId=<#>
- Comment=<string>
- LastUsed=<string>
- Issued=<date>
- FirstUsed=<date>
- Comments:
- GetCards
- -------
- -->
- MessageType=request
- Function=GetCards
- TransactionToken=<string>
- ServerTransactionToken=<string>
- (
- UserId=<#> |
- UserName=<string>
- )
- [MaxCard=<#>]
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- NCard=<#>
- [
- MagStripe=(<#>|)
- RFSite=(<#>|)
- RFID=(<#>|)
- CardId=<#>
- Comment=<string>
- LastUsed=<string>
- Issued=<date>
- FirstUsed=<date>
- ]
- [(
- MagStripe\[<i>\]=(<#>|)
- RFSite\[<i>\]=(<#>|)
- RFID\[<i>\]=(<#>|)
- CardId\[<i>\]=<#>
- Comment\[<i\]=<string>
- LastUsed\[<i\]=<date>
- Issued\[<i>\]=<date>
- FirstUsed\[<i>\]=<date>
- ){<ncard-1>}]
- )
- Comments:
- If there is more than one card associated with the supplied user, NCard will be set and
- there will be NCard-1 extra MagStripe, RFSite, RFID, Comment, LastUsed, Issued and FirstUsed
- field items, indexed by [<i>], starting at 1.
- If the MaxCard field is set in the Client to Server request, no more than MaxCard number of
- Cards will be returned (NCard <= MaxCard).
- AddCard
- -------
- -->
- MessageType=request
- Function=AddCard
- TransactionToken=<string>
- ServerTransactionToken=<string>
- (
- UserId=<#> |
- UserName=<string>
- )
- (
- MagStripe=(<#>|) |
- [RFSite=<#>]
- RFID=<#> |
- MagStripe=<#>
- [RFSite=<#>]
- RFID=<#> |
- Issue=(fob|rfidsticker|magstripe)
- )
- [Type=<string>]
- [Comment=<string>]
- <--
- Response=(success|fail)
- [Reason=<string>]
- CardId=<#>
- Comments:
- The request will fail if the user tries to add a pre-existing card.
- If RFSite is not specified, a default value will be used.
- If Issue is set, an 'anonymous' card will be created that does not have
- magstripe or rfsite/rfid credential information set and must be accessed
- by its cardid. On the back-end, this will generate a re-issue request whereby
- a card will be shipped to the users shipping address and the appropriate
- credential information will be filled in depending on what type of re-issue
- request (magsripe for a magstripe request, rfsite/rfid for a fob/rfidsticker
- request) by the person fulfilling the re-issue request.
- Type can be used as an extra field as an indicator for any special actions
- or operations that need to be be performed when adding a card to the account.
- i.e. that the MagStripe is really the
- student id and one needs to do a fuzzy match to add the card to the students
- account.
- RemoveCard
- ----------
- -->
- MessageType=request
- Function=RemoveCard
- TransactionToken=<string>
- ServerTransactionToken=<string>
- (
- UserId=<#> |
- UserName=<string>
- )
- (
- MagStripe=<#> |
- [RFSite=<#>]
- RFID=<#> |
- CardId=<#>
- )
- <--
- Response=(success|fail)
- [Reason=<string>]
- Comments:
- The request will fail if the user does not own a card with the specified
- credentials or if there are any passes on the card. One may only remove
- a card with no non-expired passes.
- If RFSite is not specified, a default value will be used.
- RemovePass
- ----------
- -->
- MessageType=request
- Function=RemovePass
- TransactionToken=<string>
- ServerTransactionToken=<string>
- (
- UserId=<#> |
- UserName=<string>
- )
- (
- MagStripe=<#> |
- [RFSite=<#>]
- RFID=<#> |
- CardId=<#>
- )
- PassId=<#>
- <--
- Response=(success|fail)
- [Reason=<string>]
- Comments:
- Remove a pass assicated with a card.
- If RFSite is not specified, a default value will be used.
- GetPassesOnCard
- ---------------
- -->
- MessageType=request
- Function=GetPassesOnCard
- TransactionToken=<string>
- ServerTransactionToken=<string>
- (
- UserId=<#> |
- UserName=<string>
- )
- (
- MagStripe=<#> |
- [RFSite=<#>]
- RFID=<#> |
- CardId=<#>
- )
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- NPass=<#>
- [
- PassId=<#>
- Active=<#>
- Comment=<string>
- LastUsed=<date>
- Issued=<date>
- FirstUsed=<date>
- Type=(nday|nride|preactive|<company card>)
- QueueOrder=<#>
- Comment=<string>
- NRideOrig=(<#>|)
- NRideRemain=(<#>|)
- NDayOrig=(<#>|)
- NDayExpiration=(<date>|)
- PayType=(cash|credit)
- ]
- [(
- PassId\[<i>\]=<#>
- Active\[<i>\]=<#>
- Comment\[<i>\]=<string>
- LastUsed\[<i>\]=<date>
- Issued\[<i>\]=<date>
- FirstUsed\[<i>\]=<date>
- Type\[<i>\]=(nday|nride|preactive|<company card>)
- QueueOrder\[<i>\]=<#>
- Comment\[<i>\]=<string>
- NRideOrig\[<i>\]=(<#>|)
- NRideRemain\[<i>\]=(<#>|)
- NDayOrig\[<i>\]=(<#>|)
- NDayExpiration\[<i>\]=(<date>|)
- PayType\[<i>\]=(cash|credit)
- ){<NPass-1>}]
- )
- Comments:
- If there are multiple passes associated with the supplied card, NPass will be set and there will
- be NPass-1 extra PassId, Comment, LastUsed, Issued, FirstUsed, Type, QueueOrder, Comment, NRideOrig, NrideRemain,
- NDayOrig and NDayExpiration, indexed by [<i>], starting at 1.
- If RFSite is not specified, a default value will be used.
- GetPass
- -------
- -->
- MessageType=request
- Function=GetPass
- TransactionToken=<string>
- ServerTransactionToken=<string>
- (
- UserId=<#> |
- UserName=<string>
- )
- PassId=<#>
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- Active=<#>
- Issued=<date>
- FirstUsed=<date>
- LastUsed=<date>
- Type=(nday|nride|preactive|<company card>)
- QueueOrder=<#>
- Comment=<string>
- NRideOrig=(<#>|)
- NRideRemain=(<#>|)
- NDayOrig=(<#>|)
- NDayExpiration=(<date>|)
- PayType=(cash|credit)
- )
- Comment:
- The request will fail if the PassId is not associated with the user.
- TransferPass
- ------------
- -->
- MessageType=request
- Function=TransferPass
- TransactionToken=<string>
- ServerTransactionToken=<string>
- (
- UserId=<#> |
- UserName=<string>
- )
- PassId=<#>
- (
- ToMagStripe=<#> |
- [ToRFSite=<#>]
- ToRFID=<#> |
- ToCardId=<#>
- )
- <--
- Response=(success|fail)
- [Reason=<string>]
- Comments:
- The request will fail if the To credential is taken or invalid.
- If ToRFSite is not specified, a default value will be used.
- Depending on permissions on the Server, the request might fail even if the
- user provides a valid To credential.
- AddPass
- -------
- -->
- MessageType=request
- Function=AddPass
- TransactionToken=<string>
- ServerTransactionToken=<string>
- (
- UserId=<#> |
- UserName=<string>
- )
- (
- MagStripe=<#> |
- [RFSite=<#>]
- RFID=<#> |
- CardId=<#>
- )
- Comment=<string>
- (
- Type=<string> |
- Type=<nride-type>
- NRide=<#> |
- Type=<nday-type>
- NDay=<#>
- [Expiration=<date>]
- )
- [Quantity=<#>]
- [(PaymentType=cash
- PaymentAmount=<#> |
- PaymentType=credit
- AuthorizationCode=<string>
- PaymentAmount=<#>)]
- <--
- (
- Response=fail
- [Reason=<string>]
- Response=success |
- [Reason=<string>]
- PassId=<#>
- [(PassId[<#>]=<#>]){<Quantity-1>}]
- )
- Comment:
- If RFSite is not specified, a default value will be used.
- Type must be one of the card types. currently supported types are:
- <nday-type>:
- NDAYAC, N-day All County
- NDAYTC, N-day Gov County
- NDAYYSS(\d\d), N-day Youth Semester Spring for year 20XX
- NDAYYSF(\d\d), N-day Youth Semester Fall for year 20XX
- NDAYSF(\d\d), N-Day Summer Fun for year 20XX
- <nride-type>:
- NRIDEACA, N-Ride All County Adult
- NRIDEACH, N-Ride All County Half
- NRIDEACY, N-Ride All County Youth
- NRIDETCA, N-Ride Gov County Adult
- NRIDETCH, N-Ride Gov County Half
- NRIDETCY, N-Ride Gov County Youth
- If type is not nday or nride, it must be a billing domain.
- If type is set and not 'cash', AuthorizationCode should be the Authorization Code of the
- transaction.
- Quantity number of passes will be created. Quantity assumed to be 1 if none specified.
- The PassId (and PassId[<#>] where appropriate) will contain the pass id's of
- the newly inserted passes. The PassId and indicies into the PassId array are
- _for this function only_ and do not reflect what indicies will be returned via
- a call to any of the other functions (GetPassesOnCard etc.).
- SendEmailVerification
- ----------------------
- -->
- MessageType=request
- Function=SendEmailVerification
- ServerTransactionToken=<string>
- RedirectURL=<string>
- Email=<string>
- <--
- (
- Response=fail
- [Reason=<string>]
- Response=success |
- [Reason=<string>]
- )
- Comment:
- Send an email to specified email address with a link back to the redirect
- url with the following variables set:
- action=register
- registrationtoken=<token>
- The registration token must be given to the add user for it to successfully
- complete.
- The RegistrationToken will only be valid for 1 day after the registration
- request has been initiated.
- SendEmailPasswordReset
- ----------------------
- -->
- MessageType=request
- Function=SendEmailPasswordReset
- ServerTransactionToken=<string>
- UserName=<string>
- RedirectURL=<string>
- Email=<string>
- <--
- (
- Response=fail
- [Reason=<string>]
- Response=success |
- [Reason=<string>]
- )
- Comment:
- Send an email with a link back to the RedirectURL. The following variables
- will appear in the link back to the RedirectURL:
- action=password_reset
- username=<string>
- passwordresettoken=<string>
- The token must be provided to the PasswordReset for it to successfully
- complete.
- The option to reset a password will only be valid for 2 days after
- the reset request has been sent.
- A maximum of 3 SendEmailPasswordReset attempts may be made before a
- successful login or a successful PasswordReset request has completed.
- PasswordReset
- -------------
- -->
- MessageType=request
- Function=PasswordReset
- ServerTransactionToken=<string>
- PasswordResetToken=<string>
- PasswordHash=<string>
- <--
- (
- Response=fail
- [Reason=<string>]
- Response=success |
- [Reason=<string>]
- )
- Comment:
- PasswordResetToken must be the result of a password reset request
- (SendEmailPasswordReset). The PasswordReset request will fail if
- the PasswordResetToken is not the most recent active PasswordResetToken.
- A PasswordResetToken will be inactivated upon a new PasswordResetToken
- generation for a particular user or if the timeout has expired (2 days in this
- case).
- Assuming that the PasswordResetToken is
- set to the most recent SendEmailPasswordReset request, then the
- user's password hash will be set to PasswordHash. The user will be
- the same as the UserName specified in the SendEmailPasswordReset.
- The option to reset a password will only be valid for 2 days after
- the reset request has been sent.
- Log
- ---
- -->
- MessageType=request
- Function=Log
- ServerTransactionToken=<string>
- Log=<string>
- <--
- (
- Response=fail
- [Reason=<string>]
- Response=success |
- [Reason=<string>]
- )
- Comment:
- Put the string of text specified in Log into an internal log.
- GetCardPricePoints
- ------------------
- -->
- MessageType=request
- Function=GetCardPricePoints
- TransactionToken=<string>
- ServerTransactionToken=<string>
- (
- UserId=<#> |
- UserName=<string>
- )
- PasswordHash=<string>
- [
- MagStripe=<#> |
- [RFSite=<#>]
- RFID=<#> |
- CardId=<#>
- ]
- Comment=<string>
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- NPricePoint=<#>
- GroupName=<string>
- GroupId=<string>
- (
- Price=<#>|<#.#>
- Param=<#>
- Name=<string>
- Rule=<string>
- Type=<string>
- Description=<string>
- NumPriceOption=<#>
- PriceOption0=<string>
- PriceOption1=<string>
- PriceOption2=<string>
- PriceOption3=<string>
- [(
- Price=<#>|<#.#>
- Param=<#>
- Name=<string>
- Rule=<string>
- Type=<string>
- Description=<string>
- NumPriceOption=<#>
- PriceOption0=<string>
- PriceOption1=<string>
- PriceOption2=<string>
- PriceOption3=<string>
- ){<NPricePoint>-1}]
- )
- )
-
- Comment:
- Returns a list of price points for a given card, restricted to the price
- points available for that card (e.g. it's group).
- Price is in dollars
- Param is the number of rides for an NRide type, the number of days for an
- NDay type and blank for an other type.
- Name is an identifier. The current convention is to have the rule without
- the preceeding groupname if it's an other. If it's an NRide or NDay, the form
- is:
- ORG\.(NRIDE|NDAY)\.ZON([12])\.([AHY])\.(\d+)
- where $1 is 'NRIDE' or 'NDAY' depending on which type it is, $2 is 1 or 2
- depending on which zone it is, $3 is A for adult, H for half, Y for youth and
- $4 is the parameter.
- Rule is the database rule without group name prefix
- Type is other, nride or nday
- Description is a string description of the pass type
- NumPriceOption is the number of PriceOption[0123] to use
- PriceOption[0123] are strings meant to help the web site build it's drop
- down of options. Currently the convention is:
- NDAY: PriceOption0 is the zone identifier (e.g. 'Zone 1', 'Zone 2')
- PriceOption1 is the nday identifier (e.g. 'Single', 'Double', 'Month')
- NRide: PriceOption0 is the zone identifier
- PriceOption1 is the nride identifier
- PriceOption2 is the quantity identifier
- Other: PriceOption0 is the pass description (e.g. 'Semester Spring (k-12, 2012, Zone1)')
-
- ADMIN FUNCTIONS
- ---------------
- AdminGetCard
- ------------
- -->
- MessageType=request
- Function=AdminGetCard
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- CARD_CREDENTIAL
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- MagStripe=(<#>|)
- RFSite=(<#>|)
- RFID=(<#>|)
- CardId=<#>
- Comment=<string>
- LastUsed=<string>
- Issued=<date>
- FirstUsed=<date>
- )
- Comments:
- AdminGetCards
- -------------
- -->
- MessageType=request
- Function=AdminGetCards
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- USER_CREDENTIAL
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- NCard=<#>
- [
- MagStripe=(<#>|)
- RFSite=(<#>|)
- RFID=(<#>|)
- CardId=<#>
- Comment=<string>
- LastUsed=<string>
- Issued=<date>
- FirstUsed=<date>
- ]
- [(
- MagStripe\[<i>\]=(<#>|)
- RFSite\[<i>\]=(<#>|)
- RFID\[<i>\]=(<#>|)
- CardId\[<i>\]=<#>
- Comment\[<i\]=<string>
- LastUsed\[<i\]=<date>
- Issued\[<i>\]=<date>
- FirstUsed\[<i>\]=<date>
- ){<ncard-1>}]
- )
- Comments:
- If there is more than one card associated with the supplied user, NCard will
- be set and there will be NCard-1 extra MagStripe, RFSite, RFID, Comment,
- LastUsed, Issued and FirstUsed field items, indexed by [<i>], starting at 1.
- If the MaxCard field is set in the Client to Server request, no more than
- MaxCard number of Cards will be returned (NCard <= MaxCard).
- AdminGetPass
- -------------
- -->
- MessageType=request
- Function=AdminGetPass
- TransactionToken=<string>
- ServerTransactionToken=<string>
- CardId=<#>
- PassId=<#>
- [UserId=<#>]
- [Active=[01]]
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- Type=<string>
- PassId=<#>
- CardId=<#>
- Issued=<date>
- FirstUsed=<date>
- LastUsed=<date>
- Deactivated=<date>
- Rule=<string>
- NRideOrig=<#>
- NRideRemain=<#>
- NDayOrig=<#>
- NDayExpiration=<date>
- QueueOrder=<#>
- Comment=<string>
- Active=[01]
- Expired=<date>
- PaymentType=<string>
- Comment=<string>
- Comments:
- AdminGetAdmin
- -------------
- -->
- MessageType=request
- Function=AdminGetAdmin
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- USER_CREDENTIAL
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- Comments:
- User here is an admin user and will look up the appropriate fields in the
- admins table, not the users table.
- AdminGetPassesOnCard
- -------------
- -->
- MessageType=request
- Function=AdminGetAdmin
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- CARD_CREDENTIAL
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- NPass=<#>
- [
- PassId=<#>
- Active=<#>
- Comment=<string>
- LastUsed=<date>
- Issued=<date>
- FirstUsed=<date>
- Type=(nday|nride|preactive|<company card>)
- QueueOrder=<#>
- Comment=<string>
- NRideOrig=(<#>|)
- NRideRemain=(<#>|)
- NDayOrig=(<#>|)
- NDayExpiration=(<date>|)
- PayType=(cash|credit)
- ]
- [(
- PassId\[<i>\]=<#>
- Active\[<i>\]=<#>
- Comment\[<i>\]=<string>
- LastUsed\[<i>\]=<date>
- Issued\[<i>\]=<date>
- FirstUsed\[<i>\]=<date>
- Type\[<i>\]=(nday|nride|preactive|<company card>)
- QueueOrder\[<i>\]=<#>
- Comment\[<i>\]=<string>
- NRideOrig\[<i>\]=(<#>|)
- NRideRemain\[<i>\]=(<#>|)
- NDayOrig\[<i>\]=(<#>|)
- NDayExpiration\[<i>\]=(<date>|)
- PayType\[<i>\]=(cash|credit)
- ){<NPass-1>}]
- )
- Comments:
- AdminGetGetPendingQueue
- -------------
- -->
- MessageType=request
- Function=AdminGetAdmin
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- NCard=<#>
- [
- CardId=<#>
- Created=<date>
- IssueType=<string>
- UserId=<#>
- [(
- CardId\[<i>\]=<#>
- Created\[<i>\]=<date>
- IssueType\[<i>\]=<string>
- UserId\[<i>\]=<#>
- ){<NPass-2>}]
- ]
- Comments:
- AdminCreateCard
- ---------------
- -->
- MessageType=request
- Function=AdminCreateCard
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- USER_CREDENTIAL
- CARD_CREDENTIAL
- [IssueType=<string>]
- [LastUsed=<date>}
- [Issued=<date>}
- [FirstUsed=<date>}
- [Deactivated=[01]}
- [Comment=<string>]
- <--
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- CardId=<#>
- Comments:
- Create a new user_card entry with the appropriate fields. The default group
- is currently set to 'ORG'. If RFSite is not provided (without a MagToken) but a MagStripe
- is, this will be taken to be the default of the group (taken from the
- org_default_card_value table).
- AdminAddCard
- ------------
- -->
- MessageType=request
- Function=AdminAddCard
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- USER_CREDENTIAL
- CARD_CREDENTIAL
- [Type=<string>]
- [Comment=<string>]
- <--
- Response=(success|fail)
- [Reason=<string>]
- CardId=<#>
- Comments:
- Associates a pre-existing card to a user.
- AdminGetAdmin
- -------------
- -->
- MessageType=request
- Function=AdminGetAdmin
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- USER_CREDENTIAL
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- GroupId=<#>
- GroupName=<string>
- UserId=<#>
- UserName=<#>
- Comments:
- USER_CREDENTIAL refers to the desired admin being looked up
- AdminProcessPendingQueue
- -------------
- -->
- MessageType=request
- Function=AdminProcessPendingQueue
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- QueueId=<#>
- CARD_CREDENTIAL
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- CardId=<#>
- Comments:
- AdminRemovePendingQueue
- -------------
- -->
- MessageType=request
- Function=AdminRemovePendingQueue
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- QueueId=<#>
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- Comments:
- AdminCreateCardBlock
- -------------
- -->
- MessageType=request
- Function=AdminCreateCardBlock
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- CARD_CREDENTIAL
- NCard=<#>
- [PASS_CREDENTIAL]
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- Comments:
- Will add NCard cards in total starting at CARD_CREDENTIAL and incrementing
- the appropriate field (RFID or MagStripe) adding a pass, PASS_CREDENTIAL,
- to each or none if no PASS_CREDENTIAL is specified.
- A hard limit of 1000 is set and requests for more than 1000 at one time will
- fail.
- AdminSetUser
- -------------
- -->
- MessageType=request
- Function=AdminSetUser
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- USER_CREDENTIAL
- [PasswordHash=<string>]
- [FirstName=<string>]
- [LastName=<string>]
- [Phone=<string>]
- [Email=<string>]
- [Address=<string>]
- [City=<string>]
- [State=<string>]
- [ZIP=<string>]
- [ShippingFirstname=<string>]
- [ShippingLastname=<string>]
- [ShippingAddress=<string>]
- [ShippingCity=<string>]
- [ShippingState=<string>]
- [ShippingZIP=<string>]
- [Comment=<string>]
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- UserId=<#>
- Comments:
- AdminSetAdmin
- -------------
- -->
- MessageType=request
- Function=AdminSetAdmin
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- USER_CREDENTIAL
- [PasswordHash=<string>]
- [GroupName=<string>]
- [GroupId=<#>]
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- UserId=<#>
- Comments:
- AdminAddPass
- -------------
- -->
- MessageType=request
- Function=AdminAddPass
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- CARD_CREDENTIAL
- [Comment=<string>]
- (
- Type=<string> |
- Type=<nride-type>
- NRide=<#> |
- Type=<nday-type>
- NDay=<#>
- [Expiration=<date>]
- )
- [Quantity=<#>]
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- PassId=<#>
- [(
- PassId\[<i>\]=<#>
- ){Quantity-1}]
- Comments:
- AdminAddUser
- -------------
- -->
- MessageType=request
- Function=AdminAddUser
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- UserName=<string>
- [PasswordHash=<string>]
- [FirstName=<string>]
- [LastName=<string>]
- [Phone=<string>]
- [Email=<string>]
- [Address=<string>]
- [City=<string>]
- [State=<string>]
- [ZIP=<string>]
- [ShippingFirstname=<string>]
- [ShippingLastname=<string>]
- [ShippingAddress=<string>]
- [ShippingCity=<string>]
- [ShippingState=<string>]
- [ShippingZIP=<string>]
- [Comment=<string>]
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- UserId=<#>
- Comments:
- AdminAddAdmin
- -------------
- -->
- MessageType=request
- Function=AdminAddAdmin
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- UserName=<string>
- PasswordHash=<string>
- [GROUP_CREDENTIAL]
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- UserId=<#>
- Comments:
- AdminRemovePass
- -------------
- -->
- MessageType=request
- Function=AdminRemovePass
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- PassId=<#>
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- Comments:
- Expires pass. If the pass was active it deactivates it. If the pass was activae and
- another unexpired pass exists after it, will activate the next unexpired pass
- in theq queue.
- AdminRemovePasses
- -------------
- -->
- MessageType=request
- Function=AdminRemovePasses
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- NPass=<#>
- PassId=<#>
- [(
- PassId\[<i>\]=<#>
- ){Npass-1}]
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- Comments:
- Same as AdminRemovePass but will deactivate multiple passes at once
- AdminRemoveCard
- -------------
- -->
- MessageType=request
- Function=AdminRemoveCard
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- CARD_CREDENTIAL
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- Comments:
- Deactivates card.
- AdminRemoveUser
- -------------
- -->
- MessageType=request
- Function=AdminRemoveUser
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- USER_CREDENTIAL
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- Comments:
- Deactivates user
- AdminRemoveAdmin
- -------------
- -->
- MessageType=request
- Function=AdminRemoveAdmin
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- USER_CREDENTIAL
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- Comments:
- Deactivates admin identified by USER_CREDENTIAL
- AdminTransferCard
- -------------
- -->
- MessageType=request
- Function=AdminTransferCard
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- CARD_CREDENTIAL
- [GROUP_CREDENTIAL]
- (
- ToCardId=<#> |
- (
- (ToMagTrack=<#>)
- ToMagStripe=<#> |
- ToMagToken=<string>
- ) |
- (
- [ToRFSite=<#>]
- ToRFID=<#> |
- ToRFIDToken=<string>
- ) |
- )
- [(
- ToGroupId=<#> |
- ToGroupName=<string>
- )]
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- Comments:
- Transfers card passes from CARD_CREDENTIAL to To(CardId|MagStripe|RFID)
- credential. Transfers userid as well, overwriting previous userid with the
- new one.
- AdminTransferPass
- -------------
- -->
- MessageType=request
- Function=AdminTransferPass
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- PassId=<#>
- (
- ToCardId=<#> |
- (
- (ToMagTrack=<#>)
- ToMagStripe=<#> |
- ToMagToken=<string>
- ) |
- (
- [ToRFSite=<#>]
- ToRFID=<#> |
- ToRFIDToken=<string>
- ) |
- )
- [(
- ToGroupId=<#> |
- ToGroupName=<string>
- )]
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- Comments:
- Transfers a single pass. Note a new pass is not created and the
- logical_card_id of the pass is changed to point to the new card.
- AdminGetPassOptions
- -------------
- -->
- MessageType=request
- Function=AdminGetPassOptions
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- NGroup=<#>
- GroupName=<string>
- [(
- GroupName\[<i>\]=<string>
- ){NGroup-1}]
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- NPassOption=<#>
- PassOptionId=<#>
- GroupId=<#>
- GroupName=<string>
- Param=<string>
- Name=<string>
- Rule=<string>
- Type=<string>
- Description=<#>
- Start=<date>
- Expiration=<date>
- DefaultNRide=<#>
- DefaultNDay=<#>
- NumPassOption=<#>
- Option0=<string>
- Option1=<string>
- Option2=<string>
- Option3=<string>
- [(
- PassOptionId\[=<#>
- GroupId\[<i>\]=<#>
- GroupName\[<i>\]=<string>
- Param\[<i>\]=<string>
- Name\[<i>\]=<string>
- Rule\[<i>\]=<string>
- Type\[<i>\]=<string>
- Description\[<i>\]=<#>
- Start\[<i>\]=<date>
- Expiration\[<i>\]=<date>
- DefaultNRide\[<i>\]=<#>
- DefaultNDay\[<i>\]=<#>
- NumPassOption\[<i>\]=<#>
- Option0\[<i>\]=<string>
- Option1\[<i>\]=<string>
- Option2\[<i>\]=<string>
- Option3\[<i>\]=<string>
- ){NPassOption-1}]
- Comments:
- NPassOption is the number of pass options returned.
- Param is the number of rides for an NRide type, the number of days for an
- NDay type and blank for an other type.
- Name is an identifier. The current convention is to have the rule without
- the preceeding groupname if it's an other. If it's an NRide or NDay, the form
- is:
- ORG\.(NRIDE|NDAY)\.ZON([12])\.([AHY])\.(\d+)
- where $1 is 'NRIDE' or 'NDAY' depending on which type it is, $2 is 1 or 2
- depending on which zone it is, $3 is A for adult, H for half, Y for youth and
- $4 is the parameter.
- Rule is the database rule without group name prefix
- Type is other, nride or nday
- Description is a string description of the pass type
- (Start|Expiration) are the start and expiration of the pass, should it have
- a start and expiration date.
- DefaultN(Ride|Day) are the default parameters for the passes
- NumPriceOption is the number of PriceOption[0123] to use
- PriceOption[0123] are strings meant to help the web site build it's drop
- down of options. Currently the convention is:
- NDAY: PriceOption0 is the zone identifier (e.g. 'Zone 1', 'Zone 2')
- PriceOption1 is the nday identifier (e.g. 'Single', 'Double', 'Month')
- NRide: PriceOption0 is the zone identifier
- PriceOption1 is the nride identifier
- PriceOption2 is the quantity identifier
- Other: PriceOption0 is the pass description (e.g. 'Semester Spring (k-12, 2012, Zone1)')
- AdminAddCardToUser
- -------------
- -->
- MessageType=request
- Function=AdminAddCardToUser
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- CARD_CREDENTIAL
- USER_CREDENTIAL
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- Comments:
- Associates card to user
- AdminRemoveCardFromUser
- -------------
- -->
- MessageType=request
- Function=AdminRemoveCardFromUser
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- CARD_CREDENTIAL
- USER_CREDENTIAL
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- Comments:
- Dissassociates a card from a user (i.e. set userid=NULL for the user_card
- entry)
- AdminGetAdminPermissions
- -------------
- -->
- MessageType=request
- Function=AdminGetAdminPermissions
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- USER_CREDENTIAL
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- NPermission=<#>
- PrimaryGroupName=<string>
- PrimaryGroupId=<#>
- Table=<string>
- Permission=<string>
- GroupName=<string>
- [(
- Table=<string>
- Permission=<string>
- GroupName=<string>
- ){NPermission-1}]
-
- Comments:
- Returns a list of tables the admin identified by USER_CREDENTIAL has access
- to. Permissions are of type 'create', 'read', 'update', 'delete' (crud).
- i.e. get all aro_aco entries for aro '/admins/<admin_name>' for aco subtree
- '/org_db/'
- AdminAddAdminPermissions
- -------------
- -->
- MessageType=request
- Function=AdminAddAdminPermissions
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- USER_CREDENTIAL
- NPermission
- Table=<string>
- Permission=<string>
- GroupName=<string>
- [(
- Table=<string>
- Permission=<string>
- GroupName=<string>
- ){NPermission-1}]
-
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- Comments:
- adds aro_aco entry for aro '/admins/<admin_name>' and aco
- '/org_db/<Table>/<Permission>' for admin identified by USER_CREDENTIAL
- note, admin identified by ADMIN_CREDENTIAL must have 'update' permissions
- on the table in question
- AdminRemoveAdminPermissions
- -------------
- -->
- MessageType=request
- Function=AdminRemoveAdminPermissions
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- USER_CREDENTIAL
- NPermission
- Table=<string>
- Permission=<string>
- GroupName=<string>
- [(
- Table=<string>
- Permission=<string>
- GroupName=<string>
- ){NPermission-1}]
-
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- Comments:
- removes aro_aco entry for aro '/admins/<admin_name>' and aco
- '/org_db/<Table>/<Permission>' for admin identified by USER_CREDENTIAL
- note, admin identified by ADMIN_CREDENTIAL must have 'delete' permissions
- on the table in question
- AdminAddAdminApiPermissions
- -------------
- -->
- MessageType=request
- Function=AdminAddAdminApiPermissions
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- UserName=<string>
- NPermission=<#>
- ApiFunction=<string>
- [(
- ApiFunction\[<i>\]=<string>
- ){NPermission-1}]
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- Comments:
- Adds api function access to admin identified by 'UserName'. i.e. adds a new
- aro_aco entry for aro '/admins/<UserName>' and aco '/api/<ApiFunction>'.
- AdminRemoveAdminApiPermissions
- -------------
- -->
- MessageType=request
- Function=AdminRemoveAdminApiPermissions
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- UserName=<string>
- NPermission=<#>
- ApiFunction=<string>
- [(
- ApiFunction\[<i>\]=<string>
- ){NPermission-1}]
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- Comments:
- Removes api function access to admin identified by 'UserName'. i.e. removes
- aro_aco entry for aro '/admins/<UserName>' and aco '/api/<ApiFunction>'.
- AdminSetAdminApiPermissions
- -------------
- -->
- MessageType=request
- Function=AdminSetAdminApiPermissions
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- UserName=<string>
- NPermission=<#>
- ApiFunction=<string>
- [(
- ApiFunction\[<i>\]=<string>
- ){NPermission-1}]
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- Comments:
- Removes all api access functions for admin <UserName> and adds the
- <ApiFuncion[<i>]> in their place.
- AdminGetCustomCard
- -------------
- -->
- MessageType=request
- Function=AdminGetCustomCard
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- (
- [MagTrack=<#>]
- MagStripe=<#> |
- MagToken=<#>
- )
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- MagStripe=(<#>|)
- RFSite=(<#>|)
- RFID=(<#>|)
- CardId=<#>
- Comment=<string>
- LastUsed=<string>
- Issued=<date>
- FirstUsed=<date>
- Comments:
- The provided MagStripe should be the custom card id, without the
- associated 'card number' (the last two digits as they exist on the magstripe).
- This will only search custom cards.
- AdminGetAdmins
- -------------
- -->
- MessageType=request
- Function=AdminGetAdmins
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- UserName=<string>
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- NUsers=<#>
- UserName=<string>
- [(
- UserName\[<i>\]=<string>
- ){NUsers-1}]
- Comments:
- Returns a list of admins from the groups that the admin identified by
- USER_CREDENTIAL has access to.
- AdminSearchCards
- -------------
- -->
- MessageType=request
- Function=AdminSearchCards
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- SearchText=<string>
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- NItem=<#>
- CardId=<#>
- MagToken=<string>
- RFIDToken=<string>
- Comment=<string>
- UserId=<#>
- LastUsed=<date>
- FirstUsed=<date>
- GroupId=<#>
- UserName=<string>
- GropuName=<string>
- [(
- CardId=<#>
- MagToken=<string>
- RFIDToken=<string>
- Comment=<string>
- UserId=<#>
- LastUsed=<date>
- FirstUsed=<date>
- GroupId=<#>
- UserName=<string>
- GropuName=<string>
- ){NItem-1}]
-
- Comments:
- Returns a list of cards that match SearchText when a wildcard match (
- '%<SearchText>%' done on :
- user_card.mag_token
- user_card.rfid_token
- user_card.comment
- user_card.issued
- user_card.lastused
- user_card.firstused
- user_card.username
- groups.group_name
- only active cards are returned.
- There is a hard limit of 100 results returned.
- AdminSearchUsers
- -------------
- -->
- MessageType=request
- Function=AdminSearchUsers
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- SearchText=<string>
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- Address
- City
- Comment
- Email
- FirstName
- LastName
- NItem
- Phone
- ShippingAddress
- ShippingCity
- ShippingCountryCode
- ShippingCountryName
- ShippingName
- ShippingState
- ShippingZIP
- State
- UserId
- UserName
- ZIP
- [(
- Address\[<i>\]
- City\[<i>\]
- Comment\[<i>\]
- Email\[<i>\]
- FirstName\[<i>\]
- LastName\[<i>\]
- NItem\[<i>\]
- Phone\[<i>\]
- ShippingAddress\[<i>\]
- ShippingCity\[<i>\]
- ShippingCountryCode\[<i>\]
- ShippingCountryName\[<i>\]
- ShippingName\[<i>\]
- ShippingState\[<i>\]
- ShippingZIP\[<i>\]
- State\[<i>\]
- UserId\[<i>\]
- UserName\[<i>\]
- ZIP\[<i>\]
- ){NItem-1}]
- Comments:
- Returns a of users that match SearchText when a wildcard match (
- '%<SearchText>%' done on :
- users.userid
- users.username
- users.first_name
- users.last_name
- users.phone
- users.email
- users.address
- users.city
- users.state
- users.zip
- users.comment
- users.shipping_name
- users.shipping_address
- users.shipping_city
- users.shipping_state
- users.shipping_zip
- users.shipping_country_code
- users.shipping_country_name
- groups.group_name
- only active users are returned.
- There is a hard limit of 100 results returned.
- AdminSearchAdmins
- -------------
- -->
- MessageType=request
- Function=AdminSearchAdmins
- TransactionToken=<string>
- ServerTransactionToken=<string>
- ADMIN_CREDENTIAL
- SearchText=<string>
- <--
- (
- Response=fail
- [Reason=<string>] |
- Response=success
- [Reason=<string>]
- NItem=<#>
- GroupId=<#>
- GroupName=<#>
- UserId=<#>
- UserName=<#>
- [(
- GroupId=<#>
- GroupName=<#>
- UserId=<#>
- UserName=<#>
- ){NItem-1}]
-
- Comments:
- Returns a list of admins that match SearchText when a wildcard match (
- '%<SearchText>%' done on :
- admins.username
- admins.userid
- admins.group_id
- only active admins are returned.
- There is a hard limit of 100 results returned.
|