Gift card

Gift cards are a form of prepaid card or a voucher that is loaded with funds for future use. Gift cards are generally redeemable only for purchases at the store and generally cannot be cashed out. Gift cards are sold and paid for in the POS as with any other item.

The gift-card endpoint in LS One API allows retrieval of one or all gift cards.

Actions

GET 

Get gift card
GET  Get all gift cards

Properties

Field Data type Validation Description
id string

-

Unique identifier of the gift card

balance decimal - Amount available on the gift-card
active bool - Gift card is active
issued bool - Gift card was issued to a customer
refillable bool -

Gift card is refillable

Any amount can be added to the gift card anytime after it's issuing.

currency string

length = 3

Default currency of the gift card. The gift card can only be used in stores that has the given currency as store currency.
createdDate datetime - Issuing date of gift card (when the gift card was sold )
lastUsedDate datetime - Last date the gift card was used
barcode string -

A barcode assigned to the gift card

Examples

Get gift card

Returns details of a single gift card.

GET /api/gift-card/{id}

Permissions

  • GiftCard:Read

For more information on authenticating to LS One APIs, see Authentication.

Request

curl -X 'GET' \
'https://lsoneapi.lsretail.com/api/gift-card/00000001' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer {authentication_token}'

 

Parameter Data type Validation Description
id string

Required

The unique ID of the gift card

Response

{
	"id": "00000001",
	"balance": 100.000000000000,
	"active": true,
	"issued": true,
	"refillable": false,
	"currency": "EUR",
	"createdDate": "1900-01-01T00:00:00",
	"lastUsedDate": "1900-01-01T00:00:00",
	"barCode": ""
}

Status codes

Code Text Description
200 Success Success
401 Unauthorized LS One API client did not provide a valid authentication token or it does not have permissions to read gift-card(s)
404 Not Found The requested gift card was not found

 

Get all gift cards

Returns a list of all gift cards.

GET /api/gift-card

Permissions

  • GiftCard:Read

For more information on authenticating to LS One APIs, see Authentication.

Request

curl -X 'GET' \
  'https://lsoneapi.lsretail.com/api/gift-card' \
  -H 'accept: text/plain' \
 -H 'Authorization: Bearer {authentication_token}'

Response

[
	{
		"id": "00000002",
		"balance": 100.000000000000,
		"active": true,
		"issued": true,
		"refillable": false,
		"currency": "EUR",
		"createdDate": "1900-01-01T00:00:00",
		"lastUsedDate": "1900-01-01T00:00:00",
		"barCode": ""
	},
	{
		"id": "00000003",
		"balance": 100.000000000000,
		"active": true,
		"issued": true,
		"refillable": false,
		"currency": "EUR",
		"createdDate": "1900-01-01T00:00:00",
		"lastUsedDate": "1900-01-01T00:00:00",
		"barCode": ""
	},
	...
]

Status codes

Code Text Description
200 Success Success
401 Unauthorized LS One API client did not provide a valid authentication token or it does not have permissions to read gift-card(s)
404 Not Found No gift cards found