Developers
Sign inGet API keys
API reference/Commerce

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.

holygrail.storefront.v1.StorefrontService7 methodsstorefront.read · storefront.write

GetStorefront#

storefront.readRead
POST/holygrail.storefront.v1.StorefrontService/GetStorefront

The store, its look, live banners, catalog, delivery and payment options.

Request body

Response

bannersBanner[]
categoriesCategory[]
productsProduct[]
pickupPointsPickupPoint[]pickup_points
Request
curl https://api.buziin.tech/holygrail.storefront.v1.StorefrontService/GetStorefront \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "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#

storefront.writeWrite
POST/holygrail.storefront.v1.StorefrontService/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

idstring
customerNamestringcustomer_name
customerPhonestringcustomer_phone
customerEmailstringcustomer_email
fulfilmentstring
zoneIdstringzone_id
addressstring
pickupLocationIdstringpickup_location_id
notestring
paymentMethodstringpayment_method
returnUrlstringreturn_url

Where 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.

carstring

Drive-thru: the car, so the window knows who to hand it to.

payLaterPlanTypeIdstringpay_later_plan_type_id

payment_method pay_later: the plan type, and the shopper's ID when the business requires one (id_type nida, passport, driving_licence, voter).

idTypestringid_type
idNumberstringid_number

Response

orderOrder
paymentUrlstringpayment_url

For Pesapal: the page where the shopper pays.

Request
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
    }
  ]
}'
Response example
{
  "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#

storefront.readRead
POST/holygrail.storefront.v1.StorefrontService/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

tokenstring

Response

orderOrder
Request
curl https://api.buziin.tech/holygrail.storefront.v1.StorefrontService/GetOrder \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "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#

storefront.readRead
POST/holygrail.storefront.v1.StorefrontService/FindOrder

Finds an order by its number and the phone it was placed with.

Request body

numberstring
phonestring

Response

tokenstring
Request
curl https://api.buziin.tech/holygrail.storefront.v1.StorefrontService/FindOrder \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "phone": "+255712345678"
}'
Response example
{
  "token": ""
}

RetryPayment#

storefront.writeWrite
POST/holygrail.storefront.v1.StorefrontService/RetryPayment

Starts paying again with Pesapal, for an order whose payment failed or was abandoned.

Request body

tokenstring
returnUrlstringreturn_url

Response

paymentUrlstringpayment_url
Request
curl https://api.buziin.tech/holygrail.storefront.v1.StorefrontService/RetryPayment \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "paymentUrl": ""
}

RecordBannerClick#

storefront.writeWrite
POST/holygrail.storefront.v1.StorefrontService/RecordBannerClick

Counts a click on a banner.

Request body

bannerIdstringbanner_id

Response

No fields: send {}.

Request
curl https://api.buziin.tech/holygrail.storefront.v1.StorefrontService/RecordBannerClick \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{}

CheckIn#

storefront.writeWrite
POST/holygrail.storefront.v1.StorefrontService/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

tokenstring
carstring

The car, if the shopper didn't say when ordering or it changed.

Response

orderOrder
Request
curl https://api.buziin.tech/holygrail.storefront.v1.StorefrontService/CheckIn \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "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.

GetStorefrontRequest

holygrail.storefront.v1.GetStorefrontRequest

GetStorefrontResponse

holygrail.storefront.v1.GetStorefrontResponse

bannersBanner[]
categoriesCategory[]
productsProduct[]
pickupPointsPickupPoint[]pickup_points

PlaceOrderRequest

holygrail.storefront.v1.PlaceOrderRequest

idstring
customerNamestringcustomer_name
customerPhonestringcustomer_phone
customerEmailstringcustomer_email
fulfilmentstring
zoneIdstringzone_id
addressstring
pickupLocationIdstringpickup_location_id
notestring
paymentMethodstringpayment_method
returnUrlstringreturn_url

Where 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.

carstring

Drive-thru: the car, so the window knows who to hand it to.

payLaterPlanTypeIdstringpay_later_plan_type_id

payment_method pay_later: the plan type, and the shopper's ID when the business requires one (id_type nida, passport, driving_licence, voter).

idTypestringid_type
idNumberstringid_number

PlaceOrderResponse

holygrail.storefront.v1.PlaceOrderResponse

orderOrder
paymentUrlstringpayment_url

For Pesapal: the page where the shopper pays.

GetOrderRequest

holygrail.storefront.v1.GetOrderRequest

tokenstring

GetOrderResponse

holygrail.storefront.v1.GetOrderResponse

orderOrder

FindOrderRequest

holygrail.storefront.v1.FindOrderRequest

numberstring
phonestring

FindOrderResponse

holygrail.storefront.v1.FindOrderResponse

tokenstring

RetryPaymentRequest

holygrail.storefront.v1.RetryPaymentRequest

tokenstring
returnUrlstringreturn_url

RetryPaymentResponse

holygrail.storefront.v1.RetryPaymentResponse

paymentUrlstringpayment_url

RecordBannerClickRequest

holygrail.storefront.v1.RecordBannerClickRequest

bannerIdstringbanner_id

RecordBannerClickResponse

holygrail.storefront.v1.RecordBannerClickResponse

No fields.

CheckInRequest

holygrail.storefront.v1.CheckInRequest

tokenstring
carstring

The car, if the shopper didn't say when ordering or it changed.

CheckInResponse

holygrail.storefront.v1.CheckInResponse

orderOrder

StoreRef

holygrail.storefront.v1.StoreRef

hoststring

The host the shopper opened, e.g. nyotahome.example.com or shop.nyotahome.co.tz.

slugstring

Used when host is not a store address (development).

PublicStore

holygrail.storefront.v1.PublicStore

namestring
slugstring
taglinestring
openboolean
themeTheme
logoUrlstringlogo_url
currencystring
phonestring
emailstring
whatsappstring
instagramstring
addressstring
hoursstring
urlstring

The store's main address, e.g. https://shop.nyotahome.co.tz.

deliveryboolean
pickupboolean
payOnlinebooleanpay_online

Online payment through Pesapal is set up.

payOnDeliverybooleanpay_on_delivery
payOnDeliveryMaxint64 stringpay_on_delivery_max
payAtPickupbooleanpay_at_pickup
askEmailbooleanask_email
orderNotesbooleanorder_notes
driveThrubooleandrive_thru

Drive-thru pickup at the store's location (ADR 83), and its name.

driveThruNamestringdrive_thru_name
payLaterStorePayLaterpay_later

Pay in installments (ADR 121), when the business offers it online.

Banner

holygrail.storefront.v1.Banner

idstring
placementstring

hero, announcement or promo.

titlestring
subtitlestring
buttonstring
linkstring
colorstring
imageIdstringimage_id
imageUrlstringimage_url
startsAtstringstarts_at

RFC 3339; empty means from now / no end.

endsAtstringends_at
pausedboolean
sortOrderintegersort_order
clicksint64 string
statestring

live, scheduled, paused or ended (read only).

Category

holygrail.storefront.v1.Category

idstring
namestring
colorstring
imageUrlstringimage_url

A product photo from the category, for tiles.

Product

holygrail.storefront.v1.Product

idstring
namestring
descriptionstring
categoryIdstringcategory_id
imageUrlstringimage_url
variantsVariant[]

DeliveryZone

holygrail.storefront.v1.DeliveryZone

idstring
namestring
etastring
feeint64 string
freeOverint64 stringfree_over
sortOrderintegersort_order

PickupPoint

holygrail.storefront.v1.PickupPoint

locationIdstringlocation_id
namestring
notestring

LineInput

holygrail.storefront.v1.LineInput

variantIdstringvariant_id
quantityint64 string

Order

holygrail.storefront.v1.Order

idstring
numberstring
tokenstring
customerNamestringcustomer_name
customerPhonestringcustomer_phone
customerEmailstringcustomer_email
fulfilmentstring

delivery, pickup or drive_thru.

zoneIdstringzone_id
zoneNamestringzone_name
etastring
addressstring
pickupLocationIdstringpickup_location_id
pickupNamestringpickup_name
notestring
subtotalint64 string
deliveryFeeint64 stringdelivery_fee
totalint64 string
currencystring
paymentMethodstringpayment_method

pesapal, on_delivery or at_pickup.

paymentStatusstringpayment_status

unpaid, pending, paid, failed or refunded.

paymentRefstringpayment_ref
paymentDetailstringpayment_detail

How the shopper paid, e.g. "M-Pesa" or "Visa".

statusstring

awaiting_payment, new, packing, ready, out_for_delivery, completed or cancelled.

riderstring
cancelReasonstringcancel_reason
createdAtstringcreated_at
paidAtstringpaid_at
carstring

Drive-thru (ADR 83): the car, when the shopper said they were in the lane, and the register order made from it.

arrivedAtstringarrived_at
posOrderIdstringpos_order_id
payLaterPlanIdstringpay_later_plan_id

Pay 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_number
payLaterStatusstringpay_later_status
payLaterLinkstringpay_later_link
payLaterDepositint64 stringpay_later_deposit

Theme

holygrail.storefront.v1.Theme

How the store looks. Empty fields take the defaults.

presetstring

market, editorial, menu or booking.

brandColorstringbrand_color

The brand colour, #rrggbb.

headingFontstringheading_font

bricolage, fraunces, dm-sans or sora.

cornersstring

sharp, soft or round.

heroAlignstringhero_align

left or center.

hiddenSectionsstring[]hidden_sections

Home page sections that are switched off: announcement, perks, categories, products, promo.

logoImageIdstringlogo_image_id
perksstring[]

Short promises under the hero, e.g. "Same day delivery in Dar".

productsTitlestringproducts_title

The heading over the product list on the home page.

featuredCategoryIdsstring[]featured_category_ids

Up 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.

enabledboolean
minAmountint64 stringmin_amount
maxAmountint64 stringmax_amount

0 for no maximum.

requireIdbooleanrequire_id
reviewboolean

The business looks at each plan before sending the order.

Variant

holygrail.storefront.v1.Variant

idstring
namestring
priceint64 string
inStockbooleanin_stock

OrderLine

holygrail.storefront.v1.OrderLine

variantIdstringvariant_id
itemIdstringitem_id
namestring
variantNamestringvariant_name
quantityint64 string
priceint64 string
totalint64 string
imageUrlstringimage_url

OrderEvent

holygrail.storefront.v1.OrderEvent

statusstring
notestring
atstring

StorePlanOption

holygrail.storefront.v1.StorePlanOption

idstring
namestring
installmentsinteger
intervalstring

weekly, biweekly or monthly.

depositBpintegerdeposit_bp
feeBpintegerfee_bp
minAmountint64 stringmin_amount

Base URL https://api.buziin.tech. Every method is POST with a JSON body; see Making requests.