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 

API Data Retrieval

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:

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

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

  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

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 NameTypeDescriptionNotes
StoreIDintStore identifierLaundryCard: StoreID
FasCard: LocationID
CardNumberstringCard number
NamestringAccount name
AddressstringAddress
CitystringCity
StatestringState
ZipCodestringZip code
PhonestringPhone #
EmailstringEmail address
BalanceDecimalAccount balance ($)
BonusDecimalAccount bonus ($)
FreeStartsintFree start creditsMay be NULL if n/a
LoyaltyPointsintLoyalty pointsMay be NULL if n/a
DiscountfloatMax user discount available at location defined for this POSMay 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
{
	"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

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.

NameTypeDescriptionNotes
AmountdecimalAmount of value added
DescriptionstringTransaction descriptionoptional


Raw Body must be provided with request details.

Example add value of $5.00
{
	"Amount": 5.00,
	"Description": "Received $5 cash from user"
}

Response will be returned as Transact body:

NameTypeDescriptionNotes
IDlongTransaction ID
DateTimestringTransaction DateTime Formatted as ISO 8601 sortable string
(yyyy-MM-ddTHH:mm:ss)
Example transaction return body
{
	"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

Discount

For LaundryCard, the full amount is always debited from account.  The DiscountApplied parameter is ignored.

For FasCard, there are several customization options.

  • The POS equipment can be scheduled with time of day discounts enabled/disabled.  It is enabled by default.
  • Use DiscountApplied parameter to specify how specified Amount should be debited from account.
  • If DiscountApplied is not specified, its default will be 0 (false)
  • When DiscountApplied=0, FasCard will determine user's discount and apply to specified Amount before debiting from account
  • When DiscountApplied=1, the specified Amount is debited from account
NameTypeDescriptionNotes
AmountdecimalTotal vend price
DescriptionstringTransaction descriptionoptional
DiscountAppliedbooleanIndicates discount is already reflected in Amount

This feature is currently only supported for FasCard.

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
{
	"Amount": 7.00,
	"Description": "Point-of-sale vend for $7.00",
	"DiscountApplied": 0
}
Example vend of $7.00 with 10% discount pre-applied
{
	"Amount": 6.93,
	"Description": "Point-of-sale vend for $7.00 with 10% discount",
	"DiscountApplied": 1
}


Response will be returned as Transact body:

NameTypeDescriptionNotes
IDlongTransaction ID
DateTimestringTransaction DateTime Formatted as ISO 8601 sortable string
(yyyy-MM-ddTHH:mm:ss)
Example transaction return body
{
	"ID": 2147,
	"DateTime": "2019-03-26T14:34:43"
}