Airship Developers
HomeAcademy
  • Welcome
  • Rest API
    • Overview
    • Authentication
    • API Reference
    • Accreditation
  • Basics
    • Contacts
      • Write a contact
      • Append feedback
      • Append purchase history
      • Append booking data
      • Append WiFi data
      • Append Stay data
      • Append Loyalty data
      • Append ticket data
      • Append other PoPs
    • Bookings
      • Booking Search by reference
      • Booking Search by data_element
      • Booking Update
    • Search Contact
      • Search PoPs by contact
      • Search contact by Email, Mobile, Name
      • Search contact by voucher
    • Vouchers
      • Redeem voucher code
      • Check voucher code
      • Create Unique Code Group
    • Anonymous purchase data
      • Add anonymous purchase data
    • Units
    • Postman collection
  • SOAP API (legacy)
    • Overview
Powered by GitBook
On this page
  • Overview
  • Overview
  • Example Payload
  1. Basics
  2. Contacts

Append Loyalty data

Store Loyalty Interaction details as you send contact data to us

Overview

Airship can store Loyalty data for each contact. This is stored as a card entity against the contact, and each card can have different details such as Card balance, card points, etc.

A must be part of a Scheme, which is a grouping for the cards. Each card must also be unique within a Scheme, as if we see a duplicate reference - we will update the original card details.

Overview

Airship can store Loyalty data for each contact.

Field
Notes

transaction_datetime

Date time of interaction Required field

unit_id

The unit_id representing the physical location for which this Loyalty interaction relates. If provided, a PoP will also be generated for the specified transaction_datetime

Optional field

reference

The unique loyalty reference, which relates to the entity which identifies the balance / points (i.e. Card number, or customer identifier)

Required field

pin

If applicable, the pin associated to the card

Optional field

card_points

If the card has a points balance, the amount of points on that card

Optional field

card_balance

If the card has a cash value, the value that is on that card

A card can have a mixture of Points and Balance

Optional field

active

If the card is active, then active = true.

If the card has been suspended, then active = false

The flag will always default to active if not specified

Optional field

provider_id

Unique ID for the integration partner. If you are a new integrator, please contact our support team to get a new ID setup

Required field

purchase_value

If the card was purchased, the value which the card was sold for Optional field

next_expiry_amount

If the card has any points or balance which are due to expire, the next amount which will be removed from the card Optional field

next_expiry_date

If the card has any points / balance which are due to expire - the date they are due to expire Optional field

Example Payload

 {
   "account_id": 3,
   "email": "johnsmith@gmail.com",
   //...etc...
 },
 "membership_cards": [
    {
      "reference": "ABC-001-XYZ",
      "scheme_reference": "Staff Loyalty Scheme",
      "transaction_datetime": "2021-04-27 20:50:00",
      "unit_id": 67,
      "pin": 123456,
      "points": 100,
      "balance": 0,
      "active": true,
      "provider_id": 5,
      "purchase_value": 0,
      "next_expiry_amount": 0,
      "next_expiry_date": "2022-01-02"
    }
  ]
 }
PreviousAppend Stay dataNextAppend ticket data

Last updated 1 year ago