CCI LaundryCard API Overview
- 1 API Data Retrieval
- 2 Getting Connected
- 2.1 Obtain Token
- 2.1.1.1 Raw body with JSON contents:
- 2.1.1.2 Example return of AuthToken
- 2.1.2 Token usage
- 2.2 Postman Authentication
- 2.3 Verify Token
- 2.1 Obtain Token
- 3 Available API Calls
- 3.1 Cards
- 3.2 Reports
- 3.2.1 Totals
- 3.2.2 Collection
- 3.2.3 Credit Card Transactions
- 3.2.4 Employee Hours
- 3.3 Stores
- 3.3.1 Store Alerts Entrypoint
- 3.3.2 Toggle Advanced LaundryCard Live features
- 3.3.2.1 Enable Live Features
- 3.3.2.2 Disable Live Features
- 3.4 Transactions
- 3.5 Equipment Info
API Data Retrieval
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.
Getting Connected
Obtain Token
POST
https://live.laundrycard.com/api/AuthToken
Pass username and password as body to API GET call:
Raw body with JSON contents:
{
"UserName": "myLaundryCardlogin@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
Create a new collection
Right-click on the collection folder name and select Edit.
Click the Authorization tab and select the TYPE as ‘Bearer Token’.
Paste in the Token field.
Press <Update> button
Verify Token
GET https://live.laundrycard.com/api/AuthToken
The response should be same token as obtained above
Available API Calls
Cards
Get https://live.laundrycard.com/api/cards?StoreID=1081&MinCardNum=213000010051&MaxCardNum=213000010999
Get https://live.laundrycard.com/api/cards?StoreID=1081&MinCardNum=213000010051
Get https://live.laundrycard.com/api/cards?StoreID=1081
Card Information
Field Name | Type | Description | Notes |
|---|---|---|---|
CardNumber | string | Card number |
|
StoreID | int | StoreID |
|
Status | int | Card status | 1 = active |
Timestamp | datetime | Time stamp | Example: "2020-04-23T20:39:51Z" |
string |
| ||
Balance | decimal | Card balance value ($) |
|
Bonus | decimal | Bonus value ($) |
|
LoyaltyBonus | decimal | Loyalty bonus value ($) |
|
FreeDrys | int | Number of free dries |
|
LoyaltyPoints | int | Loyalty points |
|
Discount | decimal | Discount |
|
Reports
Report data is gathered from primary Xchanger at store. If store is not accessible via LCRF link then the request will fail. Each report is tied to equivalent privilege on user's card.
The report API queries support various dynamic parameters:
Refer here for more detailed overview of adjustable date/times.
Any combination of StoreID(s) or GroupID(s) can be requested.
If multiple stores then the report will contain individual store reports along with aggregated data. IDs will be combined so if a StoreID is requested along with a GroupID that contains that StoreID, the store will only be singularly requested.
Supported fields can be any combination of one or multiple of the following:
StoreID (single store ID)
StoreIDs (multiple store IDs comma delimited)
GroupID (single group ID will be automatically expanded to include each contained Store ID)
GroupIDs (multiple group IDs comma delimited)
Totals
Get https://live.laundrycard.com/api/report/Totals?StoreID=&StoreIDs=&GroupID=&GroupIDs=&endDate=
Totals Information
Collection
Get https://live.laundrycard.com/api/report/Collection?StoreID=&StoreIDs=&GroupID=&GroupIDs=&start=&end=
Collection Information
Credit Card Transactions
Get https://live.laundrycard.com/api/report/CreditCard?StoreID=&StoreIDs=&GroupID=&GroupIDs=&start=&end=
Credit Card Transactions Information
Employee Hours
Employee Hours Information
Stores
Get https://live.laundrycard.com/api/stores
Gather Store Details for all stores accessible to user
Get https://live.laundrycard.com/api/stores?q={searchParam}&noStatus={true/false}
Gather Store Details for a search query and optional request for no status (see status fields marked in yellow below which will take longer to retrieve since the query reaches out to remote Xchangers)
Get https://live.laundrycard.com/api/stores/{storeID}
Gather Store Details for specified store ID (must be accessible to user)
Field Name | Type | Description | Notes |
|---|---|---|---|
ID | int | StoreID |
|
Name | string | Store Name |
|
Address | string | Complete store address | This is set on Xchanger |
City | string | City | This is maintained on Server |
State | string | State | This is maintained on Server |
ZipCode | string | Zip Code | This is maintained on Server |
Phone | string | Store Phone# |
|
VpnIPAddress | string | IP address for VPN connection | Included with noStatus=False (by default)
|
SoftwareVersion | string | Xchanger Software Ver# | |
PlatformVersion | string | Xchanger Platform ver# | |
Favorite | boolean | Store is marked as favorite of current user | Set through Live site |
LiveEnabled | boolean | Status of Advanced LaundryCard Live licensed features |
|
Store Alerts Entrypoint
GET https://lcrf###-#.instore.laundrycard.com/api/Alerts
The above submits a Postman request directly to a store running an updated version of LaundryCard (v9.1.8+).
To get the LCRF number, you'll need to get the VPN IP address for the store, which can ben found on the Live website.
For example, if store #998 IP was 10.221.22.160. Multiply the 3rd octet by 16 and then add the 4th octet divided by 16 to get the LCRF number:
22 x 16 = 352
160 / 16 = 10
352 + 10 = 362
Meanwhile, the "-#" simply indicates that you want to submit the request to that specific X-Changer, such as "-1" for X-Changer A and "-2" for X-Changer B.
The end result, then, would be "https://lcrf362-1.instore.laundrycard.com/api/Alerts"
Field Name | Type | Description |
|---|---|---|
ID | int | StoreID |
Name | string | Store name |
Address | string | Complete store address |
Phone | string | Phone number |
TimeZone | string | Store location time zone |
Toggle Advanced LaundryCard Live features
Post https://live.laundrycard.com/api/stores/{storeID}
Update the specified store for Advanced LaundryCard Live features. Must be support user.
Enable Live Features
{
"LiveEnabled": true
}Disable Live Features
{
"LiveEnabled": false
}Transactions
Get https://live.laundrycard.com/api/transact?StoreID=1081&MinDateTime=2020-09-11T15:42:02
Get https://live.laundrycard.com/api/transact?StoreID=1081
Transact Information
Field Name | Type | Description | Notes |
|---|---|---|---|
StoreID | int | StoreID |
|
ID | int | Transaction ID |
|
DateTime | datetime | Transaction date |
|
TransType | int | Transaction type | |
MachNo | int | Machine number |
|
CardNumber | string | Card number |
|
TransAmount | decimal | Transaction amount($) |
|
AdditionalInfo | string | Additional Info | Example: "xxx0119 (VISA - CHIP) or Empty "" |
Equipment Info
GET live.laundrycard.com/api/equip
The data will be returned in JSON structure:
Type - MLV Type
Name - Equipment Name
WiredFwFile - Filename for wired reader (ends with .dat)
WifiFwVer - Version for wireless reader (does not have ending file extension)
WifiFwFile - Filename for wireless reader (ends with .b2e) May be modified in future to support more files but today only F2E readers are supported
Config - Equipment config string
Options - List of equipment options
ID - Unique option ID
Name - Option name