ShoppingateShoppingateDevelopers
shoppinggate.app ↗
Documentation
  • What is a Mini App
  • Why Mini Apps
  • API integration
  • SDK
  • Webview
  • Mini App architecture
  • Getting started
  • Choosing your path
  • Introduction
    • Introduction
    • Sign up & login
    • Dashboard & analytics
    • Mini-Programs
    • Submit & publish a version
    • App Binding
    • Privacy Settings
    • Allowed URL
    • Users & roles
    • Introduction
    • Become a Mini-App vendor
    • API keys
    • My Mini-Apps
    • Orders
    • Webhook
    • Deep-link config
    • Introduction
    • Install & log in
    • Create a project
    • The workspace
    • Preview & upload
  • Introduction
  • Configuration
  • Lifecycle
  • Routing & query
  • Host functions
  • orderPayment
  • Permissions
  • User info
  • Introduction
  • Configuration
  • SDK
  • Lifecycle
  • Routing & query
  • Host functions
  • orderPayment
  • Permissions
  • User info
  • Web app and shell calls
  • Look and feel
  • Overview
    • Verify user
    • Create order
    • Get order
    • Update order status
    • Charge an order
    • Send a notification
  • Subscriptions
    • Create a subscription
    • List subscriptions
    • Get a subscription
    • Update a subscription
    • Reschedule next charge
    • Change plan (upgrade)
    • Cancel a subscription
  • Webhooks
Endpoints

Send a notification

Push a custom (non-order) notification to one of your users. Every call carries your API key headers — see Overview.

POST/s2s/v1/notifications
What it does
Push a custom (non-order) notification to one of your users — reminders, promos, status updates. You define an event and a template for it (EN + AR, with {placeholder} tokens); SG renders it in the user's language and delivers. Requires custom_notifications_enabled on the mini app. Delivery is asynchronous — the response confirms the notification was queued.
Body
eventRequired
Your event key (≤ 50 chars) — must have an active template. Keys starting with order. are reserved.
user_idRequired
SG user id of the recipient (one per call).
variables
Object of values that fill the {placeholder} tokens in the template. {mini_app_name}, {user_name} and {user_first_name} are filled automatically — you can use them in your template without sending them (anything you do send here overrides them).
data
Optional extra push data (e.g. a deep-link in tap_action).
Request schema
{
  "event":     <string, 1..50, not "order.*">,   // required
  "user_id":   <number>,                          // required
  "variables": <object>,                          // optional — fills {placeholder} tokens
  "data":      <object>                           // optional — extra push data
}
Response
statusboolean
true on 202 (queued); false on an error envelope.
data.queuedboolean
Confirms the notification was accepted and queued. Actual push delivery happens asynchronously.
error_code (on 4xx)string
CUSTOM_NOTIFICATIONS_NOT_ENABLED (403), TEMPLATE_NOT_FOUND (404), RESERVED_EVENT_KEY (400). Branch on this, not the human message.
messagestring
Human string for logs — do not parse.
Response schema
// 202 Accepted — queued for delivery
{
  "status":  true,
  "data":    { "queued": true },
  "message": "Notification queued"
}

// 403 CUSTOM_NOTIFICATIONS_NOT_ENABLED — not enabled for this mini app
// 404 TEMPLATE_NOT_FOUND — no active template for this event
// 400 RESERVED_EVENT_KEY — event starts with "order."
{
  "status":     false,
  "error_code": "TEMPLATE_NOT_FOUND",
  "message":    "No active template for event \"promo_blast\""
}
Try it
Base URL
https://microservices.shoppinggate.app/mini-app-core/