Skip to content

Notifications and push

In-app notifications

Prefix: /v1/notifications. Auth: Customer (Authorization: Bearer).

MethodPathPurpose
GET/v1/notificationsPaginated inbox
GET/v1/notifications/sseLive stream (text/event-stream)
PATCH/v1/notifications/read-allMark all read
PATCH/v1/notifications/:notificationId/readMark one read

List

Query: page, limit, optional status = unread | read.

results:

FieldMeaning
data[]Notifications
pagination{ total, page, limit, hasMore }
unreadCountBadge number

Each notification:

FieldMeaning
_idUse for mark-read
typeStable key (see below)
statusunread | read
title, body{ "en", "ar" } — pick Accept-Language
dataOptional deep-link payload (orderId, orderNumber, ticketNumber, url, …)
createdAtISO timestamp

type values (customer)

typeWhen
order.placedOrder submitted
order.confirmedStore accepted
order.preparingPicking started
order.out_for_deliveryDriver on the way
order.deliveredDelivered
order.delivery_failedVisit failed
order.cancelledCancelled
order.refundedRefunded
points.earned / points.redeemed / points.expiringLoyalty
wallet.credited / wallet.debitedWallet
coupon.receivedCoupon granted
offer.expiringOffer ending
review.requestedAsk for a review
subscription.activated / expiring / expiredPro
account.welcome / account.password_changedAccount
campaign.messageMarketing campaign
support.ticket_created / support.replied / support.resolvedSupport

SSE

http
GET /v1/notifications/sse
Authorization: Bearer <accessToken>
Accept: text/event-stream

This is not the JSON envelope. Frames:

event: notification
data: { ...notification object... }

data is the same shape as an inbox row. Keep the connection open. Reconnect with backoff on drop.

There is no picker/driver notification SSE. Fulfillment apps should poll their queues.

Push tokens

MethodPathAuthBody
POST/v1/push/registerCustomer{ "token": "...", "platform": "ios" | "android" }

token is 10–256 characters.

FCM sending is not fully configured. Registering a token is safe; do not assume campaign push will arrive until ops enable FCM.