OCAPI gift shop
The gift shop can be used to create orders containing items that aren't purchased from a specific site, such as vouchers and gift cards. Unlike the existing gift shop ordering flow which treats the gift shop like a standard site, OCAPI has specialised endpoints and will create orders with a GiftShop order type.
Configuring the gift shop
The following system settings is used to configure the gift shop:
GiftStoreCinemaIdused to specify thesiteIdof the gift shop.DisplayGiftStoresused to determine if the configured gift shop also operates as a standard site that sells tickets. If set toNothe gift shop site will not be visible in the standard OCAPI order flow.
Viewing available items in the gift shop
The following endpoint will return all the available items in the gift shop:
GET: /ocapi/v0/sales/master-data/gift-shop/item-profile
{
"itemProfile": {
"pages": [
{
"id": "1",
"title": {
"text": "Gifts",
"translations": []
},
"buttons": [
{
"title": null,
"item": {
"modifierGroups": [],
"prices": [
{
"price": 20.0,
"isDefault": true,
"restrictions": [],
"loyaltyRewardId": null,
"discountId": null,
"discount": null
}
],
"deliveryGroupId": "",
"restrictions": [],
"id": "123",
"name": {
"text": "$20 Gift Card",
"translations": []
},
"shortName": {
"text": "$20 Card",
"translations": []
},
"description": null,
"type": "Normal",
"classId": "GIFT",
"hopk": "",
"hoCode": ""
},
"displayPriority": 1
}
],
"displayPriority": 1
}
]
},
"relatedData": {
"discounts": []
}
}
Creating a gift shop order
To create a gift order order, use the following endpoint:
POST: /ocapi/v0/orders/gift-shop
{
"id": "44c4ed39ca224aef918f0689e8edcd60",
"type": "GiftShop",
"status": "InProgress",
"totalPrice": 0.0,
"originalPrice": 0.0,
"booking": {
"bookingId": null,
"totalBookingFee": 0.0,
"originalBookingFee": 0.0,
"bookingMode": "Paid"
},
"transaction": null,
"vouchers": [],
"payments": {
"giftCardPayments": []
},
"items": [],
"expiresAt": "2020-10-05T10:18:48.223333+13:00"
}
Adding items and completing the order is then treated the same as a standard order.
Note: When the DisplayGiftStores system setting is set to No, using the gift shop siteId with the /ocapi/v0/orders/standard/booking endpoint to create a standard order will return a 400 error.