...
The API calls listed below are supported universally under both platforms (LaundryCard and FasCard). The only difference is the URL:
When accessing LaundryCard go to https://live.laundrycard.com
When accessing FasCard go to 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.
...
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
Note |
---|
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:
Code Block | ||
---|---|---|
| ||
{ "UserName": "mylogin@email.com", "Password": "myPassword" } |
The response will be a unique token identifier for your user/password login:
Example return of AuthToken
Code Block | |||||
---|---|---|---|---|---|
| |||||
{ "Token": "abcdefghijklmnopqrstuvwxyz" } |
Info |
---|
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 httpsGET https://live.laundrycard.com/api/pos/{StoreID}/{MachNo}/Account/{Card}
GET httpsGET 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
Code Block | ||
---|---|---|
| ||
{ "Name": "First Last", "Address": "123 Fake St.", "City": "My Town", "State": "AA", "ZipCode": "12345", "Phone": "111-555-9999", "Email": "email@address.com" } | ||
Code Block | ||
js | title |
Example update of just email
Code Block | ||
---|---|---|
| ||
{ "Email": "emailNew@address.com" } |
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
Info |
---|
Bonus For LaundryCard, the value added will be the final amount. No bonus program is transacted. For FasCard, the added value will be processed through any configured add-value packages. For example if there is a package to add $5 and get $6 then with a minimum $5 added value, the card will have a $1 bonus automatically added during the transaction. |
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
Code Block | ||
---|---|---|
| ||
{ "Amount": 5.00, "Description": "Received $5 cash from user" } |
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
Code Block | |||||
---|---|---|---|---|---|
| |||||
{ "ID": 2147, "DateTime": "2019-03-26T14:34:43" } |
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
Info |
---|
Discount For LaundryCard, the full amount is always debited from account. The DiscountApplied parameter is ignored. For FasCard, there are several customization options.
|
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
Code Block | ||
---|---|---|
| ||
{ "Amount": 7.00, "Description": "Point-of-sale vend for $7.00", "DiscountApplied": 0 } | ||
language | js | title |
Example vend of $7.00 with 10% discount pre-applied
Code Block | ||
---|---|---|
| ||
{ "Amount": 6.93, "Description": "Point-of-sale vend for $7.00 with 10% discount", "DiscountApplied": 1 } |
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
Code Block | ||||
---|---|---|---|---|
| ||||
{ "ID": 2147, "DateTime": "2019-03-26T14:34:43" } |