Online store
StorefrontService is what the store website calls, without signing in. Every call names the store by the address the shopper opened (host), or by slug on a development machine.
GetStorefront#
The store, its look, live banners, catalog, delivery and payment options.
Request body
storeStoreRefResponse
curl https://api.buziin.tech/holygrail.storefront.v1.StorefrontService/GetStorefront \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"store": {
"name": "Amina Mushi",
"slug": "",
"tagline": "",
"open": false,
"logoUrl": "",
"currency": "TZS",
"phone": "+255712345678",
"email": "amina@example.co.tz",
"whatsapp": "",
"instagram": "",
"address": "",
"hours": "",
"url": "",
"delivery": false,
"pickup": false,
"payOnline": false,
"payOnDelivery": false,
"payOnDeliveryMax": "0",
"payAtPickup": false,
"askEmail": false,
"orderNotes": false,
"driveThru": false,
"driveThruName": "Amina Mushi"
},
"banners": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"placement": "",
"title": "",
"subtitle": "",
"button": "",
"link": "",
"color": "",
"imageId": "",
"imageUrl": "",
"startsAt": "",
"endsAt": "",
"paused": false,
"sortOrder": 0,
"clicks": "0",
"state": ""
}
],
"categories": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"name": "Amina Mushi",
"color": "",
"imageUrl": ""
}
],
"products": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"name": "Amina Mushi",
"description": "",
"categoryId": "",
"imageUrl": ""
}
],
"zones": [
{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"name": "Amina Mushi",
"eta": "",
"fee": "150000",
"freeOver": "0",
"sortOrder": 0
}
],
"pickupPoints": [
{
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"name": "Amina Mushi",
"note": ""
}
]
}PlaceOrder#
Places an order. Prices and fees come from the server; the id comes from the shopper's browser, so placing the same order twice returns the first. For Pesapal, payment_url is where the shopper pays.
Request body
storeStoreRefidstringcustomerNamestringcustomer_namecustomerPhonestringcustomer_phonecustomerEmailstringcustomer_emailfulfilmentstringzoneIdstringzone_idaddressstringpickupLocationIdstringpickup_location_idnotestringlinesLineInput[]paymentMethodstringpayment_methodreturnUrlstringreturn_urlWhere Pesapal sends the shopper back, on the store's own address. The API adds nothing to it; the store page reads the order token from its path.
carstringDrive-thru: the car, so the window knows who to hand it to.
payLaterPlanTypeIdstringpay_later_plan_type_idpayment_method pay_later: the plan type, and the shopper's ID when the business requires one (id_type nida, passport, driving_licence, voter).
idTypestringid_typeidNumberstringid_numberResponse
orderOrderpaymentUrlstringpayment_urlFor Pesapal: the page where the shopper pays.
curl https://api.buziin.tech/holygrail.storefront.v1.StorefrontService/PlaceOrder \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"customerName": "Amina Mushi",
"customerPhone": "+255712345678",
"customerEmail": "amina@example.co.tz",
"lines": [
{
"quantity": 1
}
]
}'{
"order": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"token": "",
"customerName": "Amina Mushi",
"customerPhone": "+255712345678",
"customerEmail": "amina@example.co.tz",
"fulfilment": "",
"zoneId": "",
"zoneName": "Amina Mushi",
"eta": "",
"address": "",
"pickupLocationId": "",
"pickupName": "Amina Mushi",
"note": "",
"subtotal": "150000",
"deliveryFee": "150000",
"total": "150000",
"currency": "TZS",
"paymentMethod": "",
"paymentStatus": "",
"paymentRef": "",
"paymentDetail": "",
"status": "",
"rider": "",
"cancelReason": "",
"createdAt": "",
"paidAt": "",
"car": "",
"arrivedAt": "",
"posOrderId": "",
"payLaterPlanId": "",
"payLaterNumber": "",
"payLaterStatus": "",
"payLaterLink": "",
"payLaterDeposit": "0"
},
"paymentUrl": ""
}GetOrder#
An order by its private link. While a Pesapal payment is pending this also asks Pesapal, so the page can poll after the shopper returns.
Request body
storeStoreReftokenstringResponse
orderOrdercurl https://api.buziin.tech/holygrail.storefront.v1.StorefrontService/GetOrder \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"order": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"token": "",
"customerName": "Amina Mushi",
"customerPhone": "+255712345678",
"customerEmail": "amina@example.co.tz",
"fulfilment": "",
"zoneId": "",
"zoneName": "Amina Mushi",
"eta": "",
"address": "",
"pickupLocationId": "",
"pickupName": "Amina Mushi",
"note": "",
"subtotal": "150000",
"deliveryFee": "150000",
"total": "150000",
"currency": "TZS",
"paymentMethod": "",
"paymentStatus": "",
"paymentRef": "",
"paymentDetail": "",
"status": "",
"rider": "",
"cancelReason": "",
"createdAt": "",
"paidAt": "",
"car": "",
"arrivedAt": "",
"posOrderId": "",
"payLaterPlanId": "",
"payLaterNumber": "",
"payLaterStatus": "",
"payLaterLink": "",
"payLaterDeposit": "0"
}
}FindOrder#
Finds an order by its number and the phone it was placed with.
Request body
Response
tokenstringcurl https://api.buziin.tech/holygrail.storefront.v1.StorefrontService/FindOrder \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"phone": "+255712345678"
}'{
"token": ""
}RetryPayment#
Starts paying again with Pesapal, for an order whose payment failed or was abandoned.
Request body
Response
paymentUrlstringpayment_urlcurl https://api.buziin.tech/holygrail.storefront.v1.StorefrontService/RetryPayment \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"paymentUrl": ""
}RecordBannerClick#
Counts a click on a banner.
Request body
storeStoreRefbannerIdstringbanner_idResponse
No fields: send {}.
curl https://api.buziin.tech/holygrail.storefront.v1.StorefrontService/RecordBannerClick \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{}CheckIn#
A drive-thru order ahead's "I'm in the lane" (ADR 83): the window sees the car has arrived. Harmless to repeat.
Request body
Response
orderOrdercurl https://api.buziin.tech/holygrail.storefront.v1.StorefrontService/CheckIn \
-H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"order": {
"id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
"number": "",
"token": "",
"customerName": "Amina Mushi",
"customerPhone": "+255712345678",
"customerEmail": "amina@example.co.tz",
"fulfilment": "",
"zoneId": "",
"zoneName": "Amina Mushi",
"eta": "",
"address": "",
"pickupLocationId": "",
"pickupName": "Amina Mushi",
"note": "",
"subtotal": "150000",
"deliveryFee": "150000",
"total": "150000",
"currency": "TZS",
"paymentMethod": "",
"paymentStatus": "",
"paymentRef": "",
"paymentDetail": "",
"status": "",
"rider": "",
"cancelReason": "",
"createdAt": "",
"paidAt": "",
"car": "",
"arrivedAt": "",
"posOrderId": "",
"payLaterPlanId": "",
"payLaterNumber": "",
"payLaterStatus": "",
"payLaterLink": "",
"payLaterDeposit": "0"
}
}Types
The messages and enums these methods use. Field names are lowerCamelCase in JSON; the snake_case names work too. Enum values are sent as their names.
GetStorefrontResponse
holygrail.storefront.v1.GetStorefrontResponse
storePublicStorebannersBanner[]categoriesCategory[]productsProduct[]zonesDeliveryZone[]PlaceOrderRequest
holygrail.storefront.v1.PlaceOrderRequest
storeStoreRefidstringcustomerNamestringcustomer_namecustomerPhonestringcustomer_phonecustomerEmailstringcustomer_emailfulfilmentstringzoneIdstringzone_idaddressstringpickupLocationIdstringpickup_location_idnotestringlinesLineInput[]paymentMethodstringpayment_methodreturnUrlstringreturn_urlWhere Pesapal sends the shopper back, on the store's own address. The API adds nothing to it; the store page reads the order token from its path.
carstringDrive-thru: the car, so the window knows who to hand it to.
payLaterPlanTypeIdstringpay_later_plan_type_idpayment_method pay_later: the plan type, and the shopper's ID when the business requires one (id_type nida, passport, driving_licence, voter).
idTypestringid_typeidNumberstringid_numberPlaceOrderResponse
holygrail.storefront.v1.PlaceOrderResponse
orderOrderpaymentUrlstringpayment_urlFor Pesapal: the page where the shopper pays.
FindOrderResponse
holygrail.storefront.v1.FindOrderResponse
tokenstringRetryPaymentRequest
holygrail.storefront.v1.RetryPaymentRequest
storeStoreReftokenstringreturnUrlstringreturn_urlRetryPaymentResponse
holygrail.storefront.v1.RetryPaymentResponse
paymentUrlstringpayment_urlRecordBannerClickRequest
holygrail.storefront.v1.RecordBannerClickRequest
storeStoreRefbannerIdstringbanner_idRecordBannerClickResponse
holygrail.storefront.v1.RecordBannerClickResponse
No fields.
CheckInRequest
holygrail.storefront.v1.CheckInRequest
storeStoreReftokenstringcarstringThe car, if the shopper didn't say when ordering or it changed.
StoreRef
holygrail.storefront.v1.StoreRef
hoststringThe host the shopper opened, e.g. nyotahome.example.com or shop.nyotahome.co.tz.
slugstringUsed when host is not a store address (development).
PublicStore
holygrail.storefront.v1.PublicStore
namestringslugstringtaglinestringopenbooleanthemeThemelogoUrlstringlogo_urlcurrencystringphonestringemailstringwhatsappstringinstagramstringaddressstringhoursstringurlstringThe store's main address, e.g. https://shop.nyotahome.co.tz.
deliverybooleanpickupbooleanpayOnlinebooleanpay_onlineOnline payment through Pesapal is set up.
payOnDeliverybooleanpay_on_deliverypayOnDeliveryMaxint64 stringpay_on_delivery_maxpayAtPickupbooleanpay_at_pickupaskEmailbooleanask_emailorderNotesbooleanorder_notesdriveThrubooleandrive_thruDrive-thru pickup at the store's location (ADR 83), and its name.
driveThruNamestringdrive_thru_namePay in installments (ADR 121), when the business offers it online.
Banner
holygrail.storefront.v1.Banner
idstringplacementstringhero, announcement or promo.
titlestringsubtitlestringbuttonstringlinkstringcolorstringimageIdstringimage_idimageUrlstringimage_urlstartsAtstringstarts_atRFC 3339; empty means from now / no end.
endsAtstringends_atpausedbooleansortOrderintegersort_orderclicksint64 stringstatestringlive, scheduled, paused or ended (read only).
Category
holygrail.storefront.v1.Category
idstringnamestringcolorstringimageUrlstringimage_urlA product photo from the category, for tiles.
Product
holygrail.storefront.v1.Product
idstringnamestringdescriptionstringcategoryIdstringcategory_idimageUrlstringimage_urlvariantsVariant[]DeliveryZone
holygrail.storefront.v1.DeliveryZone
idstringnamestringetastringfeeint64 stringfreeOverint64 stringfree_oversortOrderintegersort_orderPickupPoint
holygrail.storefront.v1.PickupPoint
locationIdstringlocation_idnamestringnotestringLineInput
holygrail.storefront.v1.LineInput
variantIdstringvariant_idquantityint64 stringOrder
holygrail.storefront.v1.Order
idstringnumberstringtokenstringcustomerNamestringcustomer_namecustomerPhonestringcustomer_phonecustomerEmailstringcustomer_emailfulfilmentstringdelivery, pickup or drive_thru.
zoneIdstringzone_idzoneNamestringzone_nameetastringaddressstringpickupLocationIdstringpickup_location_idpickupNamestringpickup_namenotestringlinesOrderLine[]subtotalint64 stringdeliveryFeeint64 stringdelivery_feetotalint64 stringcurrencystringpaymentMethodstringpayment_methodpesapal, on_delivery or at_pickup.
paymentStatusstringpayment_statusunpaid, pending, paid, failed or refunded.
paymentRefstringpayment_refpaymentDetailstringpayment_detailHow the shopper paid, e.g. "M-Pesa" or "Visa".
statusstringawaiting_payment, new, packing, ready, out_for_delivery, completed or cancelled.
riderstringcancelReasonstringcancel_reasoncreatedAtstringcreated_atpaidAtstringpaid_ateventsOrderEvent[]carstringDrive-thru (ADR 83): the car, when the shopper said they were in the lane, and the register order made from it.
arrivedAtstringarrived_atposOrderIdstringpos_order_idpayLaterPlanIdstringpay_later_plan_idPay later (ADR 121): the plan, its number and status, the customer's plan link, and the deposit paid now (online through Pesapal when the store takes it, otherwise on delivery or at pickup).
payLaterNumberstringpay_later_numberpayLaterStatusstringpay_later_statuspayLaterLinkstringpay_later_linkpayLaterDepositint64 stringpay_later_depositTheme
holygrail.storefront.v1.Theme
How the store looks. Empty fields take the defaults.
presetstringmarket, editorial, menu or booking.
brandColorstringbrand_colorThe brand colour, #rrggbb.
headingFontstringheading_fontbricolage, fraunces, dm-sans or sora.
cornersstringsharp, soft or round.
heroAlignstringhero_alignleft or center.
hiddenSectionsstring[]hidden_sectionsHome page sections that are switched off: announcement, perks, categories, products, promo.
logoImageIdstringlogo_image_idperksstring[]Short promises under the hero, e.g. "Same day delivery in Dar".
productsTitlestringproducts_titleThe heading over the product list on the home page.
featuredCategoryIdsstring[]featured_category_idsUp to 6 categories for the home page tiles; empty means the first 6.
StorePayLater
holygrail.storefront.v1.StorePayLater
StorePayLater is what a shopper sees of the business's pay later terms.
enabledbooleanminAmountint64 stringmin_amountmaxAmountint64 stringmax_amount0 for no maximum.
requireIdbooleanrequire_idreviewbooleanThe business looks at each plan before sending the order.
optionsStorePlanOption[]Variant
holygrail.storefront.v1.Variant
idstringnamestringpriceint64 stringinStockbooleanin_stockOrderLine
holygrail.storefront.v1.OrderLine
variantIdstringvariant_iditemIdstringitem_idnamestringvariantNamestringvariant_namequantityint64 stringpriceint64 stringtotalint64 stringimageUrlstringimage_urlOrderEvent
holygrail.storefront.v1.OrderEvent
statusstringnotestringatstringStorePlanOption
holygrail.storefront.v1.StorePlanOption
idstringnamestringinstallmentsintegerintervalstringweekly, biweekly or monthly.
depositBpintegerdeposit_bpfeeBpintegerfee_bpminAmountint64 stringmin_amountBase URL https://api.buziin.tech. Every method is POST with a JSON body; see Making requests.