Operation Definitions
The topics below define the operations used as part of Gift and Loyalty API. Each operation definition indicates whether the operations is available for gift services, loyalty services, or both. If the operation is used for both gift and loyalty services, the parameter definitions clarify how each parameter should be used in each context.
In order to authenticate requests to the Gift and Loyalty API, users must obtain an integrator token and include it with the company_id and site_id values in the header. See the Integrator Token Documentation for details.
Endpoints
POST /activate
Summary
Use the Activate operation to enable transactions with a new gift card or to bulk activate gift cards with sequential card numbers.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The unique identifier (UID) for the company, provided by us |
header |
| string | Yes | The site ID for the location that is performing the transaction |
body |
| Yes | Includes the fields for the Activate Request Body |
Response
Field Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | The total transaction amount |
general | Yes | Includes the fields for the General Response Body |
PUT /value
Summary
Use the Value operation to add funds to a gift card balance. The Value operation can add value to the balance of a new card or add funds to an existing card. This operation is used for gift services only.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The unique identifier (UID) for the company, provided by us |
header |
| string | Yes | The site ID for the location that is performing the transaction |
body |
| Yes | Includes the fields for the Value Request Body |
Response
No specific fields.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | The total transaction amount |
general | Yes | Includes the fields for the General Response Body |
POST /bulkActivate
Summary
Use the Bulk Activate operation to enable multiple gift cards with non-sequential card numbers. The cashier should enter the first and last card numbers, the number of cards to activate, and the amount for each card. The loyalty provider will return a list of the card numbers that were activated.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The unique ID for the company, provided by us |
header |
| string | Yes | The site identifier (ID) for the location that is performing the transaction |
body |
| Yes | Includes the fields for the Bulk Activate Request Body |
Response
Field Name | Type | Required | Description |
|---|---|---|---|
| object | Yes | The structure containing the following: acquired_method,card_number, track2, and pin. This object holds the information for the first gift card of the bulk activate. |
| object | Yes | The structure containing the following: acquired_method,card_number, track2, and pin. This object holds the information for the last gift card of the bulk activate. |
general | Yes | Includes the fields for the General Response Body |
PUT /balance
Summary
Use the Balance Inquiry operation to find out how much money is available on the gift card. This operation is used for gift services only.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously. |
header |
| string | Yes | The unique identifier (UID) for the company, provided by us |
header |
| string | Yes | The site ID for the location that is performing the transaction |
body |
| Yes | Includes the fields for the Balance Request Body |
Response
No specific fields.
Field Name | Type | Required | Description |
|---|---|---|---|
general | Yes | Includes the fields for the General Response Body |
POST /payment
Summary
Use the Payment operation to use the gift card's balance to fund a transaction. This operation is used for gift services only.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The unique identifier (UID) for the company, provided by us |
header |
| string | Yes | The site ID for the location that is performing the transaction |
body |
| Yes | Includes the fields for the Payment Request Body |
Response
Field Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | The total transaction amount. The value for this field should be a negative amount. |
general | Yes | Includes the fields for the General Response Body |
POST /refund
Summary
Use the Refund operation to reverse a previous gift or loyalty transaction. This operation adds the fund or awards from the transaction back to the gift card or customer award balance. This operation is used for gift and loyalty services.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The unique identifier (UID) for the company, provided by us |
header |
| string | Yes | The site ID for the location that is performing the transaction |
body |
| Yes | Includes the fields for the Refund Request Body |
Response
Field Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | The refund transaction amount |
general | Yes | Includes the fields for the General Response Body |
POST /reverse
Summary
Use the Reverse Transaction operation to deactivate a single gift card or sequential gift cards that were previously activated with the Bulk Activate operation. The Reverse operation also reverses an Add Value transaction.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The unique identifier (UID) for the company, provided by us |
header |
| string | Yes | The site ID for the location that is performing the transaction |
body |
| Yes | Includes the fields for the Reverse Request Body |
Response
No specific fields.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | The total transaction amount |
| string | Yes | The card balance before a successful reverse |
general | Yes | Includes the fields for the General Response Body |
POST /reverseBulkActivate
Summary
Use the Reverse Bulk Activate operation to deactivate non-sequential gift cards that were previously activated with the Bulk Activate operation.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The unique identifier (UID) for the company, provided by us |
header |
| string | Yes | The site ID for the location that is performing the transaction |
body |
| Yes | Includes the fields for the Reverse Bulk Activate Body |
Response
Field Name | Type | Required | Description |
|---|---|---|---|
| object | Yes | The structure containing the following: acquired_method,card_number, track2, and pin. This object holds the information for the first gift card of the reverse bulk activation. |
| object | Yes | The structure containing the following: acquired_method,card_number, track2, and pin. This object holds the information for the last gift card of the reverse bulk activation. |
general | Yes | Includes the fields for the General Response Body |
PUT /cashout
Summary
Use the Cashout operation to zero the gift card balance and give the gift card owner the remaining card balance in cash. The card balance must be below a specified amount to be eligible for cashout.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The unique identifier (UID) for the company, provided by us |
header |
| string | Yes | The site ID for the location that is performing the transaction |
body |
| Yes | Includes the fields for the Cashout Request Body |
Response
No specific fields.
Field Name | Type | Required | Description |
|---|---|---|---|
general | Yes | Includes the fields for the General Response Body |
Data Models
GeneralRequestBody
Field Name | Type | Required | Description |
|---|---|---|---|
| string (enum) | Yes | The method of entering the card data (SWIPE: when gift card has been swiped, MANUAL: when gift card number has been entered manually, SCAN: when gift card number has been scanned via camera or barcode scanner) |
| string | No | The version of Gift and Loyalty the company uses |
| string | Yes | The card number on the gift card |
| string | Yes | The type of the card used in the transaction |
| string | Yes | The identifier for the employee who entered the transaction |
| string | No | The transaction currency |
| string | Yes | The date and time of the transaction in YYYY-MM-DDTHH:MM:SS.001Z format |
| string | Yes | The time of activation in HH:MM:SS.001 format |
| string | Yes | The date of the transaction in YYYY-MM-DD format |
| string | Yes | The identifier for the terminal at the site |
| string | Yes | The identifier used by the terminal to track the transaction |
| string | Yes | The unique ID of the transaction |
| string | No | Use Track2 data when the gift card is swiped/scanned on a device. NoteIf |
| string | No | The PIN code entered for gift card |
GeneralResponseBody
Field Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | The gift card balance. The same value as the amount field on the request. |
| string | Yes* | The card number on the gift card. *Except for bulk activation and reverse bulk activation. |
| string | Yes | The transaction identification value |
| string | Yes | The format mask for the gift cards number values |
| string, number | Yes | The response HTTP code |
| string | Yes | The response message |
| string | Yes | The response name |
| string | Yes | The request authorization code |
| string | Yes | The provider identification (ID) |
| string | Yes | The provider name |
| string | Yes | The server date and time |
ActivateRequestBody
Field Name | Type | Required | Description |
|---|---|---|---|
| number | Yes | The amount that will be added to the gift card during activation |
| string | Yes | The point of sale (POS) order identification |
| boolean | Yes | A flag that determines if the gift card is preloaded |
general | Yes | Includes the fields for the General Request Body |
ValueRequestBody
Field Name | Type | Required | Description |
|---|---|---|---|
| number | Yes | The amount that will be added to the gift card during activation |
| string | Yes | The point of sale (POS) order identification |
| object | No | The order object containing all details |
| boolean | Yes | A flag that determines if the gift card is preloaded |
general | Yes | Includes the fields for the General Request Body |
BulkActivateRequestBody
Field Name | Type | Required | Description |
|---|---|---|---|
| object | Yes | The structure containing the following: acquired_method,card_number, track2, and pin. This object holds the information of the first gift card of the bulk activate. |
| object | Yes | The structure containing the following: acquired_method,card_number, track2, and pin. This object holds the information of the last gift card of the bulk activate. |
| number | Yes | The amount of gift cards to be activated |
| number | Yes | The amount value to be added to the gift cards |
| string | Yes | The order identification value |
general | Yes | Includes the fields for the General Request Body |
BalanceRequestBody
No specific fields.
Field Name | Type | Required | Description |
|---|---|---|---|
general | Yes | Includes the fields for the General Request Body |
PaymentRequestBody
Field Name | Type | Required | Description |
|---|---|---|---|
| number | Yes | The gift card current amount |
| string | Yes | The point of sale (POS) order identification |
| object | No | The order object containing all details |
general | Yes | Includes the fields for the General Request Body |
RefundRequestBody
Field Name | Type | Required | Description |
|---|---|---|---|
| number | Yes | The amount to be refunded to the gift card |
| object | Yes | The order object containing all details |
| string | Yes | The point of sale (POS) order identification |
| boolean | Yes | A flag that determines if the gift card is preloaded |
general | Yes | Includes the fields for the General Request Body |
ReverseRequestBody
Field Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | The point of sale (POS) order identification. |
| number | Yes | The transaction amount of the original transactions being reversed |
| string | Yes | The type of the reverse transaction. This field should be set to This field should be set to |
| string | Yes | The transaction identifier (ID) of the original transaction being reversed. For example, if the gift card payment is reversed, the |
| object | No | The order object containing all details |
general | Yes | Includes the fields for the General Request Body |
ReverseBulkActivateRequestBody
Field Name | Type | Required | Description |
|---|---|---|---|
| object | Yes | The structure containing the following: acquired_method,card_number, track2, and pin. This object holds the information of the first gift card of the bulk activate. |
| object | Yes | The structure containing the following: acquired_method,card_number, track2, and pin. This object holds the information of the last gift card of the bulk activate. |
| number | Yes | The amount of gift cards to be reversed |
| number | Yes | The amount to applied to gift cards after the bulk reserve |
| string | Yes | The point of sale (POS) order identification |
general | Yes | Includes the fields for the General Request Body |
CashoutRequestBody
No specific fields.
Field Name | Type | Required | Description |
|---|---|---|---|
general | Yes | Includes the fields for the General Request Body |
Sample Code
Activate
Sample Request Body
{
"card_type": "GIFT",
"currency": "usd",
"transaction_token": "9999999999999999",
"is_open_price": true,
"order_id": "9999999999999999",
"pin": "999",
"track2": "9999999999999999",
"card_number": "9999999999999999",
"local_time": "13:10:01.001",
"acquired_method": "MANUAL",
"terminal_id": "9",
"clerk_id": "999",
"terminal_txn_id": "999",
"application_version": "1.0.0",
"local_date": "20YY-07-02",
"date_time": "20YY-07-02T13:10:01.001Z"
}Sample Response Body
{
"card_number": "9999999999999999",
"masked_card_data": "", // Masked card data
"card_balance": 5.00, // Remaining balance of the card after
transaction
"previous_balance": 10.00, // Previous balance (Value Link)
"server_date_time": "yyyy-mm-ddThh:mm:ss.000Z", // Zulu (UTC) date
timestamp of response
"response_code": "1", // Response code of XGS
"currency": "usd", // Currency used in the transaction
"host_txn_id": "", // Host transaction ID
"merchant_data": {
"name": "Provider Name", // Name of the selected provider
(merchant_name)
"id": "1", // Merchant ID
"response_code": "1", // Response code of the selected provider
"response_message": "Success", // Response message from merchant
"error_code": "1", // Merchant error code if applicable
"error_description": "Error", // Merchant error description
if needed
"response_name": "Response Name",
"authorization_code": "" //
}
}Add Balance
Sample Request Body
{
"card_number": "9999999999999999",
"card_type": "GIFT",
"currency": "usd",
"transaction_token": "9999999999999999",
"is_open_price": true,
"order_id": "9999999999999999",
"pin": "999",
"track2": "9999999999999999",
"local_time": "13:10:01.001",
"acquired_method": "MANUAL",
"terminal_id": "9",
"clerk_id": "999",
"terminal_txn_id": "999",
"application_version": "1.0.0",
"local_date": "20YY-07-02",
"date_time": "20YY-07-02T13:10:01.001Z",
"amount": 1
}Sample Response Body
{
"card_number": "9999999999999999",
"masked_card_data": "", // Masked card data
"card_balance": 5.00, // Remaining balance of the card after
transaction
"previous_balance": 10.00, // Previous balance (Value Link)
"server_date_time": "yyyy-mm-ddThh:mm:ss.000Z", // Zulu (UTC) date
timestamp of response
"response_code": "1", // Response code of XGS
"currency": "usd", // Currency used in the transaction
"host_txn_id": "", // Host transaction ID
"merchant_data": {
"name": "Provider Name", // Name of the selected provider
(merchant_name)
"id": "1", // Merchant ID
"response_code": "1", // Response code of the selected provider
"response_message": "Success", // Response message from merchant
"error_code": "1", // Merchant error code if applicable
"error_description": "Error", // Merchant error description
if needed
"response_name": "Response Name",
"authorization_code": "" //
}
}Bulk Activate
Sample Request Body
{
"first_card_info": {
"acquired_method": "MANUAL", // either "SWIPE" or "MANUAL"
"card_number": "9999999999999999" // 1st card number
},
"last_card_info": {
"acquired_method": "MANUAL", // either "SWIPE" or "MANUAL"
"card_number": "9999999999999999" // last card number
},
"amount_of_cards": 3, // quantity of card to activate
"is_open_price": true, // fixed or open price cards
"order_id": "9999999999999999", // POS order id
"terminal_txn_id": "9999999999999999", // POS order number
"application_version": "3.1.35-1", // POS version number
"clerk_id": "9999", // Employee POS Code
"card_type": "GIFT", // card type
"date_time": "20YY-10-13T14:14:46.770Z", // yyyy-mm-ddThh:mm:ss.000Z
- Zulu (UTC)
date timestamp of transaction
"local_date": "20YY1013", // YYYYMMDD - Local date to pass to the
backend provider
"local_time": "021446", // hhmmss - Local time to pass to the
backend provider
"terminal_id": "9999999999999999",
"amount": 5 // amount for activation per card
"currency": "usd",
"transaction_token": "9999999999999999",
}Sample Response Body
{
"masked_cards_data": [// activated cards masked numbers
"999999",
"999999",
"999999"
],
"card_balance": "5.00", // final card balance after activation
"server_date_time": "20YY-11-02T12:56:51.493Z",
"host_txn_id": 0, // transaction_id
"transaction_amount": "5.00", // transaction amount
"merchant_data": {
"name": "Paytronix",
"id": "999",
"response_code": 200,
"response_message": "Authorized",
"response_name": "authorizedSuccess",
"authorization_code": "999999"
}
}Balance Inquiry
Sample Request Body
Only general fields are required for this integration.
{
"outHTTP": {
"body": {
"acquired_method": "MANUAL",
"action_type": "balance",
"application_version": "3.6.25",
"card_number": "999999",
"card_type": "GIFT",
"clerk_id": "111",
"configuration": {
"currency": "USD",
"merchant_id": "30313",
"merchant_name": "XXX Xxxx"
},
"currency": "USD",
"date_time": "2022-06-01T15:07:49.381Z",
"local_date": "20220601",
"local_time": "030749",
"order_id": "d1d58d56-5cc2-4d58-881a-5d03bb71c6dd",
"terminal_id": "624e62aac6ab40e1a509fab6",
"transaction_token": "1304368751"
},
"headers": {
"Accept": "application/json",
"Connection": "keep-alive",
"Content-Type": "application/json",
"x-company-id": "610a8e567a183500076fa3a5",
"x-site-ids": "61139f06bc372c000717218a"
},
"host": "myvenuelink.ambse.com",
"method": "POST",
"path": "/MyVenueLink/api/Tags/XALProcessTagCommand"
}
}Sample Response Body
No specific fields.
{
"args": {
"card_balance": "0.000000",
"card_number": "999999",
"currency": "USD",
"host_txn_id": "",
"masked_card_number": "3298",
"merchant_data": {
"authorization_code": "",
"id": "30313",
"name": "MBS Gift",
"response_code": "200",
"response_message": "The request has succeeded",
"response_name": "OK"
},
"server_date_time": "2023-07-10T17:11:31.7672253Z",
"tips": null,
"transaction_amount": "0.000000"
}
}Payment
Sample Request Body
{
"acquired_method":"MANUAL",
"action_type":"payment",
"amount":12.99,
"application_version":"3.7.19",
"card_number":"9999999999999999",
"card_type":"GIFT",
"clerk_id":"12345",
"configuration":{
},
"currency":"USD",
"date_time":"2023-06-27T15:53:41.019Z",
"local_date":"20230627",
"local_time":"035341",
"order_id":"021e389a-fdd2-430c-9feb-eb08c8f16441",
"terminal_id":"5a5901f0fcacfe00019a7fda",
"terminal_txn_id":"100002",
"transaction_token":"2086595612"
}Sample Response Body
{
"card_balance":"0.00",
"card_number":"9999999999999999",
"currency":"USD",
"host_txn_id":"164403903",
"masked_card_data":"550258",
"merchant_data":{
"authorization_code":"814462",
"id":"216",
"name":"Mirego",
"response_code":"201",
"response_message":"Authorized Variant",
"response_name":"authorizedVariantSuccess"
},
"server_date_time":"2023-06-27T15:53:41.332385Z",
"transaction_amount":"-4.25"
}Refund
Sample Request Body
{
"acquired_method": "MANUAL",
"action_type": "refund",
"amount": 3.99,
"application_version": "3.7.19",
"card_number": "9999999999999999",
"card_type": "GIFT",
"clerk_id": "12345",
"configuration": {},
"currency": "USD",
"date_time": "2023-06-27T16:49:11.674Z",
"is_open_price": true,
"local_date": "20230627",
"local_time": "044911",
"order_id": "a6151b81-04f0-4082-aca1-a8e734812045",
"terminal_id": "5a5901f0fcacfe00019a7fda",
"terminal_txn_id": "100006",
"transaction_token": "7784348002"
}Sample Response Body
{
"card_balance": "4.25",
"card_number": "9999999999999999",
"currency": "USD",
"host_txn_id": "164403904",
"masked_card_data": "465938",
"merchant_data": {
"authorization_code": "620407",
"id": "216",
"name": "Mirego",
"response_code": "200",
"response_message": "Authorized",
"response_name": "authorizedSuccess"
},
"server_date_time": "2023-06-27T16:49:11.900824Z",
"transaction_amount": "4.25"
}Reverse Transaction
Sample Request Body
{
"acquired_method":"MANUAL",
"action_type":"reverse",
"amount":4.25,
"application_version":"3.7.19",
"card_number":"9999999999999999",
"card_type":"GIFT",
"clerk_id":"12345",
"configuration":{
},
"currency":"USD",
"date_time":"2023-06-27T16:06:09.547Z",
"host_txn_id":"164403903",
"local_date":"20230627",
"local_time":"040609",
"order_id":"021e389a-fdd2-430c-9feb-eb08c8f16441",
"terminal_id":"5a5901f0fcacfe00019a7fda",
"terminal_txn_id":"100002",
"transaction_token":"9379745637"
}Sample Response Body
{
"card_balance": "4.25",
"card_number": "9999999999999999",
"currency": "USD",
"host_txn_id": "164403903",
"masked_card_data": "550258",
"merchant_data": {
"authorization_code": "814462",
"id": "216",
"name": "Mirego",
"response_code": "201",
"response_message": "Authorized Variant",
"response_name": "authorizedVariantSuccess"
},
"server_date_time": "2023-06-27T15:53:41.332385Z",
"transaction_amount": "4.25",
"previous_card_balance": "0.00"
}Reverse Bulk Activate
Sample Request Body
{
"first_card_info": {
"acquired_method": "MANUAL",
"card_number": "9999999999999999"
},
"last_card_info": {
"acquired_method": "MANUAL",
"card_number": "9999999999999999"
},
"amount_of_cards": 3,
"is_open_price": true,
"order_id": "9999999999999999",
"terminal_txn_id": "9999999999999999",
"application_version": "3.1.35-1",
"clerk_id": "9999",
"card_type": "GIFT",
"date_time": "20YY-10-13T14:14:46.770Z",
"local_date": "20YY1013",
"local_time": "021446",
"terminal_id": "9999999999999999",
"amount": 5
"currency": "usd",
"transaction_token": "9999999999999999",
}Sample Response Body
{
"masked_card_data": "999999",
"server_date_time": "20YY-11-02T15:46:24.677Z",
"host_txn_id": "9999999999999999",
"merchant_data": {
"name": "Paytronix",
"id": "999",
"response_code": 200,
"response_message": "Bulk activation reversed and all cards reset.",
"response_name": "authorizedSuccess",
"authorization_code": "999999"
}
}Cashout
Sample Request Body
{
"card_number": "9999999999999999", // card number
"card_type": "GIFT",
"currency": "usd",
"transaction_token": "9999999999999999",
"order_id": "9999999999999999",
"pin": "999",
"track2": "9999999999999999",
"local_time": "13:10:01.001",
"acquired_method": "MANUAL", // // either "SWIPE" or "MANUAL"
"terminal_id": "9",
"clerk_id": "999",
"terminal_txn_id": "999",
"application_version": "1.0.0",
"local_date": "20YY-07-02",
"date_time": "20YY-07-02T13:10:01.001Z"
}Sample Response Body
{
"card_number": "9999999999999999",
"masked_card_data": "999999",
"card_balance": "0.00",
"server_date_time": "20YY-07-08T12:35:25.455Z",
"host_txn_id": "9999999999999999",
"transaction_amount": "-5.00",
"merchant_data": {
"name": "Paytronix",
"id": "9999",
"response_code": 200,
"response_message": "Authorized",
"response_name": "authorizedSuccess",
"authorization_code": "999999"
}
}