Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

...

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
languagejson
{
	"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
languagejs
titleExample return of AuthToken
json
{
	"Token": "abcdefghijklmnopqrstuvwxyz"
}
title
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

  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 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
FasCard: LocationID

CardNumber

string

Card number

Name

string

Account name

Address

string

Address

City

string

City

State

string

State

ZipCode

string

Zip code

Phone

string

Phone #

Email

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
language
Code Block
languagejson
{
	"Name": "First Last",
	"Address": "123 Fake St.",
	"City": "My Town",
	"State": "AA",
	"ZipCode": "12345",
	"Phone": "111-555-9999",
	"Email": "email@address.com"
}
Code Block
jstitle
Example update of just email
Code Block
languagejson
{
	"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

title
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
languagejson
{
	"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
(yyyy-MM-ddTHH:mm:ss)

Example transaction return body
Code Block
languagejs
titleExample transaction return body
json
{
	"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

title
Info

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

Name

Type

Description

Notes

Amount

decimal

Total vend price

Description

string

Transaction description

optional

DiscountApplied

boolean

Indicates discount is already reflected in Amount

Note

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
code
Code Block
languagejson
{
	"Amount": 7.00,
	"Description": "Point-of-sale vend for $7.00",
	"DiscountApplied": 0
}
languagejs
title
Example vend of $7.00 with 10% discount pre-applied
Code Block
languagejson
{
	"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
(yyyy-MM-ddTHH:mm:ss)

Example transaction return body
Code Block
languagejstitleExample transaction return bodyjson
{
	"ID": 2147,
	"DateTime": "2019-03-26T14:34:43"
}