Skip to content

Loyalty Data API (1.0)

The Loyalty Data API provides App partners with the ability to access data regarding members sales to help aggregate loyalty points. Currently the API allows apps to register their members and are notified on every transaction performed.

Overview
Languages
Servers
Production
https://api.tyro.com/connect

Registered Card

Operations

Get registered card by Id

Request

This endpoint retrieves a registered card for a registered member.

Security
JWT
Path
registeredCardIdstringrequired

Id of the registered card

Headers
Authorizationstringrequired
Default Bearer {$$.env.access_token}
curl -i -X GET \
  'https://api.tyro.com/connect/loyalty/registered-cards/{registeredCardId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
idstring

The Id of the registered card in the Tyro Connect system.

paymentIdstring

Payment Identifier generated from the payment source. It refers to the transaction.receipt (from Tyro eCommerce APIs) or otherwise referred to as the RRN.

paymentSourcestring

Source of payment.

Enum"EFTPOS""ONLINE"
originobject
preAccumulatedRewardinteger

The pre-accumulated reward amount on the card at the time of registration. If you have opted to represent rewards in AUD, then this value is in cents.

Response
application/json
{ "id": "fe6eacb4c5f5afcf650bff0ea56fdc36-6c8a6220e6f73dde3d161ce605ec68fc7a98b93c9fb708e2674b756df6fd5826c7b55516", "paymentId": "e429f245-4dcb-4961-9d27-c40538e990b2", "paymentSource": "EFTPOS", "origin": { "memberId": "foo@bar.com" }, "preAccumulatedReward": 5000 }

Delete registered card by Id

Request

This endpoint removes a registered card from a registered member.

Security
JWT
Path
registeredCardIdstringrequired

Id of the registered card

Headers
Authorizationstringrequired
Default Bearer {$$.env.access_token}
Bodyapplication/json
originobjectrequired
origin.​memberIdstringrequired

Member's Identifier on the app.

curl -i -X DELETE \
  'https://api.tyro.com/connect/loyalty/registered-cards/{registeredCardId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "origin": {
      "memberId": "member-1"
    }
  }'

Responses

No body content

Body
Response
No content

Member

Operations

Get loyalty activity by Id

Request

This endpoint retrieves a loyalty activity for a registered member.

Security
JWT
Path
loyaltyActivityIdstringrequired

ID of loyalty activity to retrieve

Headers
Authorizationstringrequired
Default Bearer {$$.env.access_token}
curl -i -X GET \
  'https://api.tyro.com/connect/loyalty/activities/{loyaltyActivityId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
idstringrequired

The Id of the loyalty activitiy in the Tyro Connect system.

Example: "0f448ac1-862a-4c7b-bdb4-a3b7cdbf6149"
locationIdstringrequired

The Id of the location as specified by the Tyro Connect system.

memberIdstring

The identifier of the member who is associated with this activity. This value corresponds to the origin.memberId provided during member registration.

paymentobjectrequired
payment.​originobject
payment.​typestring
Enum"PURCHASE""REFUND""CASHOUT""OPEN_PRE_AUTH""CLOSE_PRE_AUTH""VOID"
payment.​modestring

EFTPOS integration type. It will always be NOT_APPLICABLE for ONLINE payments.

Enum"INTEGRATED""STANDALONE""NOT_APPLICABLE"
payment.​zonedDateTimestring(date-time)
payment.​breakdownobject
payment.​totalobject(Money Positive Amount)

The total amount that was paid by the cardholder.

saleobject
Response
application/json
{ "id": "99fdaa02-4cb4-4948-a79e-4b69e4008feb", "locationId": "e429f245-4dcb-4961-9d27-c40538e990b2", "memberId": "foo@bar.com", "payment": { "origin": {}, "type": "PURCHASE", "zonedDateTime": "2021-10-11T11:00:01+11:00", "breakdown": {}, "total": {} }, "sale": null }

Create a test payment

Request

This endpoint is for creating fake payments that can be used to test your integration with our system. After registering a member, payments can be generated for that member by providing the memberId that you specified during registration.

Security
JWT
Headers
Authorizationstringrequired
Default Bearer {$$.env.access_token}
Bodyapplication/json
locationIdstringrequired

Tyro Connect's identifier for the location.

Example: "tc-testlocation-2000"
memberIdstringrequired

The identifier of the member who should be associated with this payment. This value corresponds to the origin.memberId provided during member registration.

paymentTypestringrequired

The type of payment being made

Enum"PURCHASE""REFUND""CASHOUT""OPEN_PRE_AUTH""CLOSE_PRE_AUTH""VOID"
paymentSourcestringrequired

The method used to make the payment

Enum"EFTPOS""ONLINE"
goodsAndServicesAmountnumber

The amount paid for goods and services

tipAmountnumber

The amount paid as part of a tip

surchargeAmountnumber

The amount paid as part of a surcharge

cashoutAmountnumber

The amount paid as part of a cash withdrawal

useNewCardboolean

This will simulate the member registering a new card and will trigger corresponding event NEW_REGISTERED_CARD

curl -i -X POST \
  https://api.tyro.com/connect/payments/test \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "locationId": "tc-testlocation-2000",
    "memberId": "some-member-id",
    "paymentType": "PURCHASE",
    "paymentSource": "EFTPOS",
    "goodsAndServicesAmount": 100
  }'

Responses

Created

Bodyapplication/json
string
Response
application/json
"Created"