CCI FasCard API Overview

If there are any questions that this document does not answer or are left unclear, send an email with your questions to support@laundrycard.com

Overview

WebAPI is open-ended and supports a variety of mechanisms for connecting and retrieving data.  The mobile website/app operates through API data calls.  Several other API calls have been implemented to provide a variety of data directly.  We use a freely available program called Postman (https://www.getpostman.com) but any tool can be used to interact with API.

Note: Our WebAPI servers only support connections using TLS v1.2 or later.  Earlier versions of TLS and SSL are no longer considered secure.

On this page


Getting Connected

Obtain Token

POST https://m.fascard.com/api/AuthToken

Pass username and password as body to API GET call:

Raw body with JSON contents:
{
	"UserName": "myFasCardlogin@email.com",
	"Password": "myPassword"
}

The response will be a unique token identifier for your user/password login:

Example return of AuthToken
{
	"Token": "abcdefghijklmnopqrstuvwxyz"
}

Token usage

After getting an authorization token back from our server you should pass it back in the request headers for any future requests e.g. Authorization: Bearer abcdefghijklmnopqrstuvwxyz

Note that a token will expire after some period of time.  If you send a request with an expired token then we will return a 401 Unauthorized (= unauthenticated), and in that case you can simply resubmit the username and password to the AuthToken endpoint to request a new token.

Postman Authentication

  1. Create a new collection
  2. Right-click on the collection folder name and select Edit.
  3. Click the Authorization tab and select the TYPE as ‘Bearer Token’.
  4. Paste in the Token field.
  5. Press <Update> button

Available API Calls

Account

GET https://m.fascard.com/api/Account

Account Info for current user

GET https://m.fascard.com/api/Account?MobileApp=xyz

Account Info for current user limited to specific Mobile App

Calling Account GET API with MobileApp parameter will automatically create any missing SysConfigs tied to that MobileApp that are not already associated with current user.  So this call should be done so with discretion and recommended to only be used within app.



Field NameTypeDescriptionNotes
IDintAccount ID
NamestringAccount name
NumberstringAccount number
EmployeeboolUser is an employee
ScheduledboolUser is a scheduled employee
AcceptAddValueCreditboolAdd-value by credit allowed
AcceptApplePayboolApple Pay accepted
AcceptAndroidPayboolAndroid Pay accepted
AllowMobileMachineStartboolAllow mobile start of machine
BalanceDecimalAccount balance ($)
BonusDecimalAccount bonus ($)
LoyaltyPointsintLoyalty pointsMay be NULL if n/a
LoyaltyPointsTargetintLoyalty points target May be NULL if Loyalty Points feature not active
LoyaltyPointsAwardDecimalLoyalty points award May be NULL if Loyalty Points feature not active
FreeStartsintFree start creditsMay be NULL if n/a
DiscountfloatUser discountMay be NULL if n/a
DiscountSourcestringUser discount source
LastActivityDateDateTimeDate/time of last activity (UTC)
LastLocationIDintLocation Rec ID of last activity
UserIDintUser Rec ID
UserAccountIDintUserAccount Rec ID
SurchargefloatLocation surchargeMay be NULL if n/a
SurchargeModeintLocation surcharge mode

May be NULL if n/a

BitMask field (can combine multiple options e.g. 3 = Vend + AddValue)

0 = None
1 = Vend
2 = AddValue

AllowNotifyMachAvailboolAllow push notifications for machine availability
MobileAppMobile App Data

Mobile App Data

Field Name: Name

Type: string

Description: Name of MobileApp

Notes:

ReportPrivsstringReport privileges

Only applicable for Employee account

Represented as string containing 0's or 1's with each character correlated with specific report on 1-based index

1 = All reports (overrides individual privs)
2 = Coin/Cash Totals
3 = Credit Card Transactions
4 = Multi-Vend Analysis
5 = Sales Detail
6 = Credit Card Captures
7 = Collections
8 = Employee Activity
9 = Pricing Summary
10 = Open Authorizations
11 = Loyalty Accounts
12 = Loyalty Cash
13 = Loyalty Totals
14 = Loyalty Bonus
15 = Sales Total
16 = Income
17 = Coupon Performance
18 = Machine Utilization
19 = Machine Activity
20 = Work Schedule
21 = Scheduled Tasks
22 = Sales Interval
23 = Loyalty Acquisition
24 = Sales Comparison
25 = Turns
26 = Billing History

Add-Value Package

GET  https://m.fascard.com/api/AddValuePackage

Retrieve all Add-Value packages available to current user


Field NameTypeDescriptionNotes
IDintAddValue Package Rec ID
AccountIDintSysConfig Account ID
SpendAmountDecimalAmount spent by user
BonusAmountDecimalBonus amount awarded

Cards

GET https://m.fascard.com/api/Card

Cards owned for current user


Field NameTypeDescriptionNotes
IDintCard Rec ID
NamestringCard name
NumberstringCard number
PINstringCard PIN
CreationDateDateTimeCreation date (UTC)
DepositDecimalCard deposit
DepositAccountIDintSysConfig Account ID for deposit

Coupons

GET https://m.fascard.com/api/Coupon

Coupons applied to current user


Field NameTypeDescriptionNotes
IDintCoupon Rec ID
AccountIDintSysConfig Account ID
CouponTypeintCoupon Type

0 = Join loyalty program
1 = Bonus added to account
2 = Free start credits added to account
3 = Loyalty points added to account
4 = Discount applied to account
5 = User added to user group

NamestringCoupon name
DescstringCoupon description
CodestringCoupon code
Param1stringCoupon parameter
UserAddDateDateTimeDate coupon added for user (UTC)
EndDateDateTimeEnding date (UTC)

Equipment

GET https://m.fascard.com/api/Equip

Equipment available to current user

GET  https://m.fascard.com/api/Equip?LocationID={locID}

Equipment by Location


Field NameTypeDescriptionNotes
IDintEquipment Rec ID
EquipNamestringEquipment name
EquipClassintEquipment class type

0 = Unknown
1 = Washer
2 = Dryer
3 = Washer&Dryer
4 = Kiosk
5 = Door
6 = Vending
7 = SelfTest
8 = Demo
9 = PointOfSale

OptionsList of EquipOptionEquipment options
Field NameTypeDescriptionNotes
OptionNointOption number
OptionTypeintOption type0 = Base Price
1 = Adder Price
2 = Feature
NamestringOption name
SupportsDualPocketboolEquipment support dual pocket readers

Equipment Pricing

GET  https://m.fascard.com/api/Equip/{equipID}/LocationGroup/{locGrpID}/Pricing

Alternative: GET  https://m.fascard.com/api/LocationGroup/{locGrpID}/Equip/{equipID}/Pricing

Retrieve pricing information about a particular equipment at a location group

GET  https://m.fascard.com/api/Equip/{equipID}/Location/{locID}/Pricing

Alternative: GET  https://m.fascard.com/api/Location/{locID}/Equip/{equipID}/Pricing

Retrieve pricing information about a particular equipment at a location

POST https://m.fascard.com/api/Equip/{equipID}/LocationGroup/{locGrpID}/Pricing

Alternative: POST https://m.fascard.com/api/LocationGroup/{locGrpID}/Equip/{equipID}/Pricing

Submit new pricing information about a particular equipment at a location group

POST https://m.fascard.com/api/Equip/{equipID}/Location/{locID}/Pricing

Alternative: POST https://m.fascard.com/api/Location/{locID}/Equip/{equipID}/Pricing

Submit new pricing information about a particular equipment at a location.  Note this will only be accepted if single Location in LocationGroup


Requirements: Account Admin or 'Equipment Setup' privilege

Field NameTypeDescriptionNotes
DefaultPricesList of Option Prices

Default option prices

Field NameTypeDescriptionNotes
OptionTypeint(Optional) Option type0 = Base Price
1 = Adder Price
May leave empty/unset/null and will be automatically determined from equipment configuration
OptionNointOption number

Must correspond to equipment configuration

OptionPriceDecimalOption priceValue given as currency (5.01 = $5.01)

For prices to default to free, can specify with OptionPrice as 0.00 or simply do not include

ScheduleList of Scheduled OptionsScheduled options
Field NameTypeDescriptionNotes
StartTimeintStart of pricing in minutes from Sunday 12:00 AMRange from 0 to 10079
DurationintDuration of pricing in number of minutesRange from 1 to 10079
OptionsList of Option PricesOption prices
Field NameTypeDescriptionNotes
OptionTypeint(Optional) Option type0 = Base Price
1 = Adder Price
May leave empty/unset/null and will be automatically determined from equipment configuration
OptionNointOption numberMust correspond to equipment configuration
OptionPrice

Decimal

Option priceValue given as currency (5.01 = $5.01)

For prices that match default, can specify with OptionPrice matching default or simply do not include

Equipment Pricing&Features Schedules

GET  https://m.fascard.com/api/Equip/{equipID}/Schedule/{locID}

Alternative: GET  https://m.fascard.com/api/Equip/{equipID}/Location/{locID}/Schedule

Alternative: GET  https://m.fascard.com/api/Location/{locID}/Equip/{equipID}/Schedule

Retrieve pricing and feature schedule information about a particular equipment at a location

Requirements: Account Admin or 'Equipment Setup' privilege


Field NameTypeDescriptionNotes
EquipIDintEquipment Rec ID
LocationIDintLocation Rec ID
DefaultTimeintFirst time at which all options are at their defaults


ScheduleList of EquipOptionEquipment schedules
Field NameTypeDescriptionNotes
StartTimeintStart of schedule in minutes from Sunday 12:00 AM
EndTimeintEnd of schedule in minutes from Sunday 12:00 AM
PricesList of Price

Equipment pricing schedules

Field NameTypeDescriptionNotes
NamestringOption name
OptionNointOption number

0 = Base Price
1 = Adder Price

OptionPriceDecimalOption priceValue given in cents
FeaturesList of FeatureEquipment features schedules
Field NameTypeDescriptionNotes
NamestringFeature nameText description of Feature Number
FeatureNointFeature number0 = Machine Start
1 = Discount
2 = Points Multiplier
3 = Free Start
ValueintFeature value
Feature NumberMeaning
0, 10 = Disabled
1 = Enabled
20-100 = Percentage
3

<0 = Redeem
0 = Disabled
>0 = Earn

Feedback

POST  https://m.fascard.com/api/Feedback

Submit an issue or feedback.  Email sent to employee(s) with "IssueNotify" role and if none then to all customer admins.  If Location not specified then email sent to FasCard support monitored email box.


Field NameTypeDescriptionNotes
TypeintIssue type0 = Other
1 = Location
2 = Machine
3 = Reader
4 = Employee
5 = App
DescstringIssue / feedback description
DeviceTypeintDevice type

0 = Unknown
1 = iOS App
2 = Android App
3 = Browser

DeviceVerstringDevice version


AppVerstringApp version
AppNamestringApp name
LocationIDintLocation Rec IDThis is required for all types other than 'App'
MachNointMachine number

Location

GET  https://m.fascard.com/api/Location

Locations available to current user

GET  https://m.fascard.com/api/Location/{locID}

Location by ID


Field NameTypeDescriptionNotes
IDintLocation Rec ID
AccountIDintSysConfig Account ID
LocationGroupIDintLocationGroup ID
EnabledboolLocation is enabled


NamestringLocation name


Addr1stringAddress #1
Addr2stringAddress #2
CitystringCity
StatestringState
ZipCodestringZip code
PhonestringLocation phone number
AmenitiesstringLocation amenities
TimeZonestringLocation time zone
LatitudeDecimalLocation address latitudeMay be 0.0 if incomplete address
LongitudeDecimalLocation address longitude
LogoImageExistsboolImage exists for location or Account
ThemeColor1stringBranding theme color #1Colors stored as hex color code e.g. "#1c2e53" (always 7 characters with leading '#' char)
ThemeColor2stringBranding theme color #2
CouponExistsboolOne or more coupons exist for location
RegOptsRegistration OptionsRequired registration options
Field NameTypeDescriptionNotes
NameboolName is required
PhoneboolPhone is required
AddressboolAddress is required
BirthdayboolBirthday is required
MessagestringMessage to display to user when required registration details are not set

GET  https://m.fascard.com/api/Location/{locID}/LogoImage

This returns the raw binary data of the location's logo image or falls back to Account's logo image.  It is represented as base64 data and can be displayed through html: <img src="data:image;base64,{{response}}" />

LocationGroup

GET  https://m.fascard.com/api/LocationGroup

LocationGroups available to current user

GET  https://m.fascard.com/api/LocationGroup/{locGrpID}

LocationGroup by ID


Field NameTypeDescriptionNotes
IDintLocationGroup ID
AccountIDintSysConfig Account ID
NamestringLocationGroup name


Machine

GET  https://m.fascard.com/api/Machine

Machines active for current user

GET  https://m.fascard.com/api/Machine?MachineID={machID}

Alternative:  GET https://m.fascard.com/api/Machine/{machID}

Machine by ID

GET  https://m.fascard.com/api/Machine?LocationID={locID}

Machines at location


Field NameTypeDescriptionNotes
IDintMachine Rec ID
LocationIDintLocation Rec ID
MachNostringMachine number


LabelstringMachine label
EquipIDintEquipment Rec ID
StatusintMachine status code

0 = Machine offline
1 = Machine disabled
2 = Machine online but idle
3 = Machine running
4 = Machine in diagnostic mode
5 = Duplicate machine number detected
6 = Machine error
100 = Requested firmware doesn't exist
101 = Firmware downloading to satellite
102 = Firmware downloading to reader

EnabledboolMachine enabled
VendAllowedboolMachine vend allowed
UserActiveboolUser is active on machine
FinishTimeDateTimeEstimated finish time (UTC)
PriceDecimalCurrent start price
ModelstringModel number
SerialNumberstringSerial number
InServiceDateDateTimeIn-Service date (UTC)
LastServiceDateDateTimeLast service date (UTC)
NotesstringMachine notes
PairedMachineIDintPaired Machine Rec IDnull = no pair
PocketintPocket Configurationnull = no pocket configuration
1 = Top pocket
2 = Bottom pocket
WifiAffinityintReader wifi affinity indexnull = None assigned
1-4 = Assigned affinity

Machine Edit

POST  https://m.fascard.com/api/Machine/{machID}

Request to edit values for a specific machine.

Raw Body must be provided with request details consisting of one or more of the following editable fields.  Response will be returned as Machine GET.

NameTypeDescriptionNotes
LabelstringMachine labelLimited to 32 characters
ModelstringModel numberLimited to 50 characters
SerialNumberstringSerial numberLimited to 50 characters
InServiceDateDateTimeIn-Service date (UTC)Needs to be in ISO 8601 format
YYYY-MM-DDThh:mm:ss
LastServiceDateDateTimeLast service date (UTC)
EnabledboolMachine enabled
NotesstringMachine notes


See example requests below:

Example setting a machine with label "Washer1" and Last-Service Date of Oct31,2020
{
	"Label": "Washer1",
	"LastServiceDate": "2020-10-31T00:00:00"
}

Machine History

GET  https://m.fascard.com/api/Machine/{machID}/History

Retrieve machine status history for a particular machine. Similar to admin site, only changes in status or error codes will be listed.  Default 60 change records.

Alternative:  GET  https://m.fascard.com/api/Machine/{machID}/History?Limit={rec limit}
Numbers of records returned limited to specified 'Limit' parameter with a set max of 1000. 


Field NameTypeDescriptionNotes
IDlongMachineStatus Rec ID
MachineIDintMachine Rec ID
SatelliteIDintSatellite Rec ID
SatelliteNamestringSatellite name
StatusintStatus code

0 = Machine offline
1 = Machine disabled
2 = Machine online but idle
3 = Machine running
4 = Machine in diagnostic mode
5 = Duplicate machine number detected
6 = Machine error
100 = Requested firmware doesn't exist
101 = Firmware downloading to satellite
102 = Firmware downloading to reader

StatusTextstringStatus textText description of Status Code
StatusTimeDateTimeTime of reported status (UTC)
MACAddrstringMAC address
FirmwareVersionintFirmware versionInteger representation of version #
e.g. 10413 = v1.04.13
HardwareVersionintHardware version
HardwareCode
F1 reader0
F2 reader (CC3200)1
F2 reader (CC3220) 2
Touch Kiosk Win80
Touch Kiosk Win102
StartTimeDateTimeStart time (UTC)
FinishTimeDateTimeFinish time (UTC)
RdrWifiStrengthintReader wi-fi strength (dB)
SatWifiStrengthintSatellite wi-fi strength (dB)
CoinCountintCoin count
CoinAmountDecimalCoin amount
CoinCount2intCoin count 2Only used for dual-pocket F2 reader
CoinAmount2DecimalCoin amount 2
CardTypeintCard type0 = Undefined
1 = Laundry
2 = Credit
3 = User Token
UserIDintUser Rec ID
MaintErrorintMaintenance machine error code

0 = Machine OK
1 = Unable to communicate with machine
2 = Machine leaking water
3 = Machine stuck in cycle
4 = Machine not filling
5 = Machine not draining
6 = Machine not heating
7 = Machine door problem
100 = Part or all of config was rejected
101 = One or more messages timed out or were rejected
999 = Unknown machine problem
1000 = Machine code indicates error

MlvMachErrorintMLV machine error code
MlvMachCodeintMLV machine error codeEquipment type specific error code

Satellite

GET https://m.fascard.com/api/Satellite

Satellites accessible for current user

GET https://m.fascard.com/api/Satellite/{satID}

Satellite by ID

GET https://m.fascard.com/api/Satellite?LocationID={locID}

Satellites at location


Field NameTypeDescriptionNotes
IDintSatellite Rec ID
LocationIDintLocation Rec ID
NamestringSatellite name
MACAddrstringMAC address
FirmwareVersionintFirmware versionInteger representation of version #
e.g. 12001 = v1.20.01
StatusstringSatellite current status

"Online" or "Offline"

StatusTimeDateTimeLast status update (UTC)
StartupTimeDateTimeHardware startup time (UTC)
VPNConnectTimeDateTimeVPN connection time (UTC)
StatusChangeTimeDateTimeTime of reported status (UTC)May be NULL if number of satellites ≥ 5 as this data lookup is expensive (i.e. time consuming to gather)
VPNIPv4AddrstringVPN addressValue only as current as StatusTime indicates
PublicIPv4AddrstringLast known public IP addressValue only as current as StatusTime indicates
OSMachinestringMachine OS description
UptimeDayintPercentage uptime in last 24 hoursMay be NULL if n/a
UptimeWeekintPercentage uptime in last 7 daysMay be NULL if n/a
DisconnectsDayintNumber of disconnects in last 24 hoursMay be NULL if n/a
DisconnectsWeekintNumber of disconnects in last 7 daysMay be NULL if n/a
WifiFreqChanintReader wifi frequency channel1 ~ 2412 MHz
6 ~ 2437 MHz
11 ~ 2462 MHZ
WifiAffinityintReader wifi affinity indexnull = None assigned
1-4 = Assigned affinity
ReadersOnlineintNumber of readers onlineValue only as current as StatusTime indicates
ReadersDefinedintNumber of readers definedValue only as current as StatusTime indicates
ReadersAssignedintNumber of readers assigned affinity for this satellite
UplinkStatusint[3]Array of Uplink (1-3) status codes 

Value only as current as StatusTime indicates

0 = Status unknown
1 = Unable to get DHCP address
2 = No response from internet
3 = Unable to establish VPN connection
4 = Unable to establish FasServer connection
5 = No authorization
6 = SNMP and/or API to Router OS failed
7 = No connection at interface
8 = No connection to wireless access point
9 = No response from gateway
10 = Fully online with server
11 = No response from FasCard data center router
12 = Available but not currently in use
13 = Uplink not defined

ProcessorLoadintProcessor load

Value only as current as StatusTime indicates

Percentage (0-100)

FasSatMemoryUsageintFasSat memory usage

Value only as current as StatusTime indicates

bytes

Satellite History

GET  https://m.fascard.com/api/Satellite/{satID}/History

Retrieve satellite status history for a particular satellite. Similar to admin site, only changes in status or uplinks will be listed.  Default 20 change records.

Alternative:  GET  https://m.fascard.com/api/Satellite/{satID}/History?Limit={rec limit}
Numbers of records returned limited to specified 'Limit' parameter with a set max of 1000. 


Field NameTypeDescriptionNotes
IDlongSatelliteStatus Rec ID
SatelliteIDintSatelliteRec ID
StatusintStatus code

0 = Offline
1 = Online

StatusTimeDateTimeTime of reported status (UTC)
FirmwareVersionintFirmware versionInteger representation of version #
e.g. 12001 = v1.20.01
OSMachinestringMachine OS description
StartupTimeDateTimeHardware startup time (UTC)
VPNConnectTimeDateTimeVPN connection time (UTC)
VPNIPv4AddrstringVPN addressValue only as current as StatusTime indicates
PublicIPv4AddrstringLast known public IP addressValue only as current as StatusTime indicates
ReadersOnlineintNumber of readers onlineValue only as current as StatusTime indicates
ReadersDefinedintNumber of readers definedValue only as current as StatusTime indicates
UplinkStatusint[3]Array of Uplink (1-3) status codes 

Value only as current as StatusTime indicates

0 = Status unknown
1 = Unable to get DHCP address
2 = No response from internet
3 = Unable to establish VPN connection
4 = Unable to establish FasServer connection
5 = No authorization
6 = SNMP and/or API to Router OS failed
7 = No connection at interface
8 = No connection to wireless access point
9 = No response from gateway
10 = Fully online with server
11 = No response from FasCard data center router
12 = Available but not currently in use
13 = Uplink not defined

ProcessorLoadintProcessor load

Value only as current as StatusTime indicates

Percentage (0-100)

FasSatMemoryUsageintFasSat memory usage

Value only as current as StatusTime indicates

bytes

System Statistics

GET  https://m.fascard.com/api/SysStats?Types={commaList}&MinDateTime={start}&MaxDateTime={end}&Interval{seconds}

Alternative to retrieve latest record:  GET  https://m.fascard.com/api/SysStats?Types={commaList}

This is only available for Support Admins

Retrieve system statistics of specified type(s).  Types are specified in comma delimited list.  When requesting multiple types, the records will be returned in type groups.

Do not include MinDateTime and MaxDateTime in order to get latest record.  Otherwise set MinDateTime and MaxDateTime to the desired range.  If desiring oldest records up to certain point, leave out MinDateTime and only set MaxDateTime.  Alternatively if desiring newest records from a certain point, leave out MaxDateTime and only set MinDateTime.

Interval is defined in number of seconds.  Do not include to leave returned data as original recorded period.  If specifying custom interval, the return data will be aggregated to best meet the requested interval.  For example with data collected every 10 seconds and a requested interval of 60 seconds, then each returned data structure will be comprised of combining 6 data points.  If requesting too small of an interval then the data will be returned as original with actual duration.


Field NameTypeDescriptionNotes
TypesintComma delimited list of desired statistical types

(Can combine one or more types)

Refer to listing for all types and descriptions

StartDateTimeStart time of period (UTC)
DurationfloatPeriod duration in seconds
ValuefloatStatistical value

Transactions

GET https://m.fascard.com/api/Transact?AccountID={AccountID}&UserAccountID={UserAccount ID or 0 for all}&Limit={rec limit}&lastID={previous ID}&Older={true/false}

Retrieve all or specific user account associated with specified AccountID.  Numbers of records returned limited to specified 'Limit' parameter with a set max of 1000.  Use 'LastID' parameter to resume from previous ID.  Use 'Older' parameter set to True for retrieving records prior to 'LastID' and set to False for records following 'LastID'. Records will always be returned in descending order.

Requirements:  Account Admin or 'Reports' privilege


Field NameTypeDescriptionNotes
IDlongTransaction Rec ID
RdrTransIDintReader transaction ID
AccountIDintSysConfig Account ID
DateTimeDateTimeTransaction time (UTC)
TransTypeintTransaction type

Transaction Types & SubTypes

TransSubTypeintTransaction sub-typeTransaction Types & SubTypes
LocationIDintLocation Rec ID
MachNointMachine number
CashAmountDecimalAmount of cash


CreditCardNumberstringCredit card number (last 4 digits)May be NULL if card type NOT credit
CreditCardAmountDecimalAmount spent on credit card
LoyaltyCardNumberstringLoyalty card numberMay be NULL if card type NOT loyalty
BalanceAmountDecimalChange in balance
BonusAmountDecimalChange in bonus
LoyaltyPointsintChange in loyalty points
FreeStartsintChange in free starts
NewBalanceDecimalNew loyalty balance after transaction
NewBonusDecimalNew loyalty bonus after transaction
AdditionalInfostringAdditional info
UserAccountIDintUserAccount Rec ID
CreditCardNamestringName on credit cardMay be NULL if card type NOT credit
EmployeeUserIDintEmployee User Rec ID
NewFreeStartsintNew Free Starts after transaction
NewLoyaltyPointsintNew Loyalty Points after transaction
RootTransactIDlongRoot Transaction Rec ID
UnfundedAmountDecimalUnfunded amount

User

GET  https://m.fascard.com/api/User

User Info for current user

GET https://m.fascard.com/api/User/{userID}?AccountID={accountID}

User details of specified user.  The UserID is obtained from UserAccount or Account.

Requirements:  Account Admin or 'User Manager' privilege


Field NameTypeDescriptionNotes
EmailAddressstringEmail address
VerifyCodestringVerification code
PasswordstringUser password
NamestringUser name
Addr1stringAddress #1
Addr2stringAddress #2
CitystringCity
StatestringState
ZipCodestringZip code
MobilePhonestringMobile phone
BirthdayDateTimeBirthdayMay be NULL if n/a
NewUserboolTrue if new user
NotifyCycleCompleteboolTrue to send email when cycle is nearly complete
LanguagestringUser's preferred language

"en" = English

"es" = Spanish

UserIDintUser Rec ID
AllowEmailEditboolTrue if user is not yet validated and thus capable of modifying email
EmailVerifyRequestboolSet True to request verification emailOnly used for unverified email (AllowEmailEdit=True)
PrivilegesintUser privileges0 = standard, >0 = support

POST https://m.fascard.com/api/User/{userID}?AccountID={accountID}

Edit details of specified user.  The UserID is obtained from UserAccount or Account.

Requirements:  Account Admin or 'User Manager' privilege

DELETE  https://m.fascard.com/api/User

Remove all personal details and login credentials for current user

User Notifications

GET  https://m.fascard.com/api/User/Notify?Token={pushToken}&Type={pushTokenType}

Request all push notification configurations for current user by specified token and token type (see below table specification for value enumerations).  Type is always required but if Token is not specified then all push notification configurations will be returned for user which could span multiple tokens.

POST  https://m.fascard.com/api/User/Notify

Request to set specific push notification configuration for current user.

Field NameTypeDescriptionNotes
TypeintPush Notification Token Type

0 = Undefined
1 = Firebase Cloud Messaging

TokenstringPush Notification Token
EnabledboolNotification is enabled
NotifyTypeintNotification Type0 = Undefined
10 = Satellite Offline
11 = Machine Offline
12 = CoinBox Full
13 = Collection
25 = Machine Finished
33 = Machine Available
34 = Marketing
35 = Scheduled Tasks
36 = Work Scheduled
TriggerTimeintTrigger time in minutesMay be NULL if n/a
ReminderTimeintReminder time in minutesMay be NULL if n/a

User Account


AccountID

The AccountID can be either the database SysConfigID (e.g. '12') or the store ID. (e.g. F0002).

GET  https://m.fascard.com/api/UserAccount/

Retrieve specific user account associated with specified AccountID

Requirements:  Account Admin or 'Loyalty Accounts' privilege

GET  https://m.fascard.com/api/UserAccount/{accountID}?limit={rec limit}&lastID={previous ID}&prev={true/false}

Retrieve list of user accounts associated with specified AccountID.  Numbers of records returned limited to specified 'Limit' parameter with a set max of 1000.  Use 'LastID' parameter to resume from previous ID.  Use 'Prev' parameter set to True for descending order and set to False for ascending order

Requirements:  Account Admin or 'Loyalty Accounts' privilege

GET  https://m.fascard.com/api/UserAccount/{accountID}?limit={recLimit}&lastID={previousID}&prev={true/false}&hasEmail={true/false}&lastActivity={datetime}

Retrieve list of user accounts associated with specified AccountID.  Numbers of records returned limited to specified 'Limit' parameter with a set max of 1000.  Use 'LastID' parameter to resume from previous ID.  Use 'Prev' parameter set to True for retrieving records prior to 'LastID' and set to False for records following 'LastID'.  Records will always be returned in descending order.

Note the addition of optional parameters 'hasEmail' and 'lastActivity'.  Either one, both, or neither can be included for additional filtering capabilities.

Use 'hasEmail' parameter set to True for retrieving only UserAccounts with a set email address and set to False for retrieving only UserAccounts without a set email address.  Leave 'hasEmail' parameter out to not filter by email and return all UserAccounts based on other parameters.

Use 'lastActivity' parameter for gathering UserAccounts with an activity at or newer than the specified datetime.  Leave 'lastActivity' parameter out to not filter by last activity datetime and return all UserAccounts based on other parameters.  The datetime is specified in ISO 8601 format
(e.g. YYYY-MM-DDThh:mm:ss for UTC or YYYY-MM-DDThh:mm:ss+/-hh:mm for specifying a local time offset)

Requirements:  Account Admin or 'Loyalty Accounts' privilege

GET  https://m.fascard.com/api/UserAccount/{accountID}?cardNo={card number}

Retrieve specific user account associated with specified AccountID and card number.

Requirements:  Account Admin or 'Loyalty Accounts' privilege


Field NameTypeDescriptionNotes
IDintUserAccount Rec ID
UserIDintUser Rec ID
EmailAddressstringEmail address
NamestringUser name
Addr1stringAddress #1
Addr2stringAddress #2
CitystringCity
StatestringState
ZipCodestringZip code
MobilePhonestringMobile phone
BirthdayDateTimeBirthdayMay be NULL if n/a
LanguagestringUser's preferred language

"en" = English

"es" = Spanish

EmployeeboolUser is an employee
ScheduledboolUser is a scheduled employee
BalanceDecimalAccount balance ($)
BonusDecimalAccount bonus ($)
LoyaltyPointsintLoyalty pointsMay be NULL if n/a
FreeStartsintFree start creditsMay be NULL if n/a
DiscountfloatUser discountMay be NULL if n/a
DiscountSourcestringUser discount source
LastActivityDateDateTimeDate/time of last activity (UTC)
LastLocationIDintLocation Rec ID of last activity

User Account Value Request

POST  https://m.fascard.com/api/UserAccount/{accountID}/{userAccountID}

Request to add values to a specific user account associated with specified AccountID

Requirements:  Account Admin or 'Loyalty Accounts' privilege


Raw Body must be provided with request details.  Response will be returned as User Account GET.

NameTypeDescriptionNotes
TransTypeintTransaction type

Only accepted:

2 = Add Value
3 = Adjust Value

TransSubTypeintTransaction sub-type

Only accepted:

TransTypeTransSubType
2 (Add Value)2 = Cash To Employee
3 (Adjust Value)0 = Admin adjustment
3 = Refund
BalanceDecimalBalance to set or addDo not include if not updating
BonusDecimalBonus to set or addDo not include if not updating
LoyaltyPointsintLoyalty Points to set or addDo not include if not updating
FreeStartsintFree Starts to set or addDo not include if not updating
CashDecimalCash to employeeOnly used for AddValue.CashToEmployee type
SetExactValueboolFlag whether to set values(true) or add to values(false)Only used for AdjustValue.Admin type
LocationIDintLocation Rec ID of purchase locationOnly used for AddValue.CashToEmployee
AdditionalInfostring

Optional notes or description



See example requests below:

Example adjustment for adding 100 loyalty points and 2 free starts
{
	"TransType": 3,
	"TransSubType": 0,
	"LoyaltyPoints": 100,
	"FreeStarts": 2,
	"AdditionalInfo": "This is an admin adjustment via API"
}
Example refund of $20
{
	"TransType": 3,
	"TransSubType": 3,
	"Balance": 20,
	"AdditionalInfo": "This is a refund adjustment via API"
}
Example package purchase with $10 at LocID 2
{
	"TransType": 2,
	"TransSubType": 2,
	"Cash": 10,
	"LocationID": 2
	"AdditionalInfo": "This is a CashToEmployee add via API"
}

Related pages