CCI Point-Of-Sale 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
Point-of-sale terminals can access LaundryCard and FasCard data via the following WebAPI entrypoints exposed by our public web servers. WebAPI is open-ended and supports a variety of mechanisms for connecting and retrieving data. We use a freely available program called Postman (https://www.getpostman.com ) for our own testing but any tool can be used to interact with API.
The API calls listed below are supported universally under both platforms (LaundryCard and FasCard). The only difference is the URL:
When accessing LaundryCard use
https://live.laundrycard.com
When accessing FasCard use
https://m.fascard.com
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
Configurable Information
The following items will need to be configured per Point-Of-Sale system:
Username
Password
POS machine #
Store ID (leading zeros are OK)
API base URL - LaundryCard or FasCard
Obtain Token
POST must be used when sending an API request for AuthToken. Using GET will not verify token and result in a 405 Method Not Allowed response.
POST https://live.laundrycard.com/api/AuthToken
POST https://m.fascard.com/api/AuthToken
Pass username and password as body when making the API request for token:
Raw body with JSON contents:
{
"UserName": "mylogin@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 an HTTP 401 Unauthorized (= unauthenticated) error, 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
Available API Calls
Each POS API call uses the same basic route information:
StoreID/Location ID - Store identifier
MachNo -Â Needs to match with defined POS equipment
Card - User card number
Retrieve Account
GETÂ https://live.laundrycard.com/api/pos/{StoreID}/{MachNo}/Account/{Card}
GETÂ https://m.fascard.com/api/pos/{LocationID}/{MachNo}/Account/{Card}
Account Info for card at a specific store/location
Field Name | Type | Description | Notes |
---|---|---|---|
StoreID | int | Store identifier | LaundryCard: StoreID |
CardNumber | string | Card number | Â |
Name | string | Account name | Â |
Address | string | Address | Â |
City | string | City | Â |
State | string | State | Â |
ZipCode | string | Zip code | Â |
Phone | string | Phone # | Â |
string | Email address | Â | |
Balance | Decimal | Account balance ($) | Â |
Bonus | Decimal | Account bonus ($) | Â |
FreeStarts | int | Free start credits | May be NULL if n/a |
LoyaltyPoints | int | Loyalty points | May be NULL if n/a |
Discount | float | Max user discount available at location defined for this POS | May be NULL if n/a |
Update Account
POST https://live.laundrycard.com/api/pos/{StoreID}/{MachNo}/Account/{Card}
POST https://m.fascard.com/api/pos/{LocationID}/{MachNo}/Account/{Card}
Change the user’s name, address, etc., but not their account balance, bonus, points, free starts, discount, or card number.
Raw Body must be provided with request details. Response will be returned as Account GET.
Example update of all supported values
{
"Name": "First Last",
"Address": "123 Fake St.",
"City": "My Town",
"State": "AA",
"ZipCode": "12345",
"Phone": "111-555-9999",
"Email": "email@address.com"
}
Example update of just email
Add Value Request
POST https://live.laundrycard.com/api/pos/{StoreID}/{MachNo}/AddValue/{Card}
POST https://m.fascard.com/api/pos/{LocationID}/{MachNo}/AddValue/{Card}
Request to add value to a card at a specific store/location
Name | Type | Description | Notes |
---|---|---|---|
Amount | decimal | Amount of value added | Â |
Description | string | Transaction description | optional |
Raw Body must be provided with request details.
Example add value of $5.00
Response will be returned as Transact body:
Name | Type | Description | Notes |
---|---|---|---|
ID | long | Transaction ID | Â |
DateTime | string | Transaction DateTime | Formatted as ISO 8601 sortable string |
Example transaction return body
Vend Request
POST https://live.laundrycard.com/api/pos/{StoreID}/{MachNo}/Vend/{Card}
POST https://m.fascard.com/api/pos/{LocationID}/{MachNo}/Vend/{Card}
Request vend for a card at a specific store/location
Name | Type | Description | Notes |
---|---|---|---|
Amount | decimal | Total vend price | Â |
Description | string | Transaction description | optional |
DiscountApplied | boolean | Indicates discount is already reflected in Amount | Set 1 to charge full amount Set 0 (DEFAULT) to allow processing to determine discount and automatically deduct from vend price |
Raw Body must be provided with request details.
Example vend of $7.00 expecting FasCard to apply user discount
Example vend of $7.00 with 10% discount pre-applied
Response will be returned as Transact body:
Name | Type | Description | Notes |
---|---|---|---|
ID | long | Transaction ID | |
DateTime | string | Transaction DateTime | Formatted as ISO 8601 sortable string |