Ticket voucher redemption

Ticket vouchers allow customers to redeem a voucher barcode in their possession for a special ticket that will have a special or discounted price. In some circumstances the customer may still be required to pay certain surcharges.

Ticket voucher redemption flow

Get ticket price restricted to a voucher
Add a voucher to order
Add a ticket restricted to a voucher to order

Voucher ticket types

GetTicketPricesForShowtime which will return a list of valid ticket types for the specific showtime.

Ticket price for ticket voucher will have voucher restriction and valid voucher type code returned in the response.

GET: /ocapi/v1/showtimes/0002-2681/ticket-prices

Copy
Copied
{
    "ticketPrices": [
        {
            "ticketTypeId": "0002-0050",
            "price": {
                "valueIncludingTax": 1.0,
                "valueExcludingTax": 0.86,
                "tax": 0.14
            },
            "isDefault": true,
            "bookingFee": null,
            "restrictions": [
                "Voucher"
            ],
            "rewardId": null,
            "voucherTypeCodes": [
                "ADTMM"
            ],
            "thirdPartyMemberSchemeId": null,
            "isShownAsPreviewWhenRestricted": false,
            "displayPriority": 98,
            "subscriptionId": null,
            "discountId": null,
            "discount": null
        }
    ],
    "relatedData": {
        "ticketTypes": [
            {
                "type": "Normal",
                "id": "0002-0050",
                "description": {
                    "text": "Adult Voucher",
                    "translations": []
                },
                "longDescription": null,
                "areaCategoryId": "0002-0000000001",
                "isRestrictedToMembers": false,
                "displayPriority": 0,
                "isChildTicket": false,
                "hopk": "",
                "ticketCode": null,
                "hoCode": "00098"
            }
        ],
        "items": [],
        "discounts": []
    }
}

Add ticket voucher to the order

When adding a ticket voucher to an order, AddVoucher request type field must be ticket.

POST: /ocapi/v1/orders/1aaa031755d64e6d9cbddfec4b3c8633/vouchers

Copy
Copied
{
    "type": "ticket",
    "credentials":
    {
        "barcode": "ADTMM0000111",
        "pin": "1234"
    },
    "showtimeId": "0002-2681"
}

OCAPI will validate the added ticket voucher for provided credentials and availability.

Response:

Copy
Copied
{
    "voucher": {
        "id": "b004dc1a727b406e9c1dd949258b3190",
        "type": "Ticket",
        "maskedBarcode": "........0111",
        "voucherTypeCode": "ADTMM",
        "voucherTypeDescription": {
            "text": "Adult Movie Money",
            "translations": []
        }
    },
    "availableRedemptions": 1
}

Redeeming the voucher

SetShowtime call requires voucherId (i.e., the id returned by the AddVoucher endpoint) to add the ticket voucher to the order.

PUT: /ocapi/v1/orders/1aaa031755d64e6d9cbddfec4b3c8633/showtimes/0002-2681

Copy
Copied
{
 "tickets": [
        {
            "ticketTypeId": "0002-0050",
            "voucherId": "b004dc1a727b406e9c1dd949258b3190"
        }
    ],
  "seats": []
}

The SetShowtime response includes the voucherId associated with the added ticket voucher if a ticket voucher has been added. Furthermore, the response will contain the details of the voucher. When the order is completed, the ticket voucher is redeemed and cannot be refunded as it is shown in an example below.

GET: /ocapi/v1/orders/completed/1aaa031755d64e6d9cbddfec4b3c8633

Copy
Copied
{
    "type": "Normal",
    "admissionStatus": "NotAdmitted",
    "id": "5b2523ea-a93b-4d8e-bad4-4ca7acf01aa0",
    "collectionStatus": "NotCollected",
    "refundStatus": "NotRefunded",
    "ticketTypeId": "0002-0050",
    "price": {
        "valueIncludingTax": 3.0,
        "valueExcludingTax": 2.58,
        "tax": 0.42
    },
    "amountSaved": {
        "valueIncludingTax": 15.0,
        "valueExcludingTax": 15.0,
        "tax": 0.0
    },
    "bookingFee": null,
    "rewardId": null,
    "ticketRedemptionCardId": null,
    "voucherId": "b004dc1a727b406e9c1dd949258b3190",
    "discountId": null,
    "dealId": null,
    "refundAvailability": {
        "isAvailable": false,
        "unavailableReason": "VoucherRedeemed"
    }
}