Skip to content

Gift cards, notifications and uploads ​

18. Gift cards & rewards ​

18.1 GET /api/v1/brand/mobile/shopify-gift-cards ​

Auth: Brand · Handler: fetchShopifyGiftCards (shopify_controller.ts) · No params — the brand's redeemable denominations.

18.2 POST /api/v1/user/mobile/gift-card/redeem ​

Auth: Customer · Handler: redeemShopifyGiftCard · Body payload: points ✅ (number). Optional header x-shopify-user-id links the card to a Shopify customer.

18.3 GET /api/v1/user/mobile/shopify-gift-cards ​

Auth: Customer · Handler: fetchGiftCardsByUserId · Query: limit (default 10), offset (default 0). No Joi here — non-numeric values silently fall back to the defaults.

18.4 POST /api/v1/user/mobile/gift-card/refund ​

Auth: Customer · Handler: refundShopifyGiftCard · Body payload: gift_card_id ✅ (string). Deactivates the card, converts the balance back to points at the brand's spend ratio, writes a refund transaction.

18.5 POST /api/v1/user/mobile/tremendous/reward ​

Auth: Customer · Handler: createTremendousReward (tremendous_controller.ts) · Body payload: rewardValue ✅ (number).


19. Device tokens, preferences & notifications ​

19.1 POST /api/v1/user/mobile/user-device-token (customer) · POST /api/v1/mobile/user-device-token (guest) ​

Handler: addUserDeviceToken (user_device_token_controller.ts) — one handler, two mounts. The guest mount registers the token with no userId (pre-login push).

Body payload: device_token ✅ (string), platform ✅ — keys of devicePlatformTypes: IOS, ANDROID, WEB (uppercase keys, not the iOS/Android/Web values).

19.2 GET /api/v1/user/mobile/device-tokens ​

Auth: Customer · Handler: fetchUserDeviceTokens · No params.

19.3 GET /api/v1/user/mobile/preferences ​

Auth: Customer · Handler: getUserPreferences (user_preference_controller.ts) · No params.

19.4 PUT /api/v1/user/mobile/preference ​

Auth: Customer · Handler: updateUserPreference Body payload is an array (not an object) — [{ id ✅ (number), email_consent?, sms_consent?, push_notifs_consent?, push_notifs_sound?, apn_consent?, in_app_push_notifs_consent? }], all flags boolean.

19.5 GET /api/v1/user/mobile/notification/logs ​

Auth: Customer · Handler: fetchUserInAppNotifications · Query: type (string), limit, offset.

19.6 PUT /api/v1/user/mobile/notification/read/:id ​

Auth: Customer · Handler: markInAppNotificationAsRead · Path: id (number) ✅.

19.7 GET /api/v1/user/mobile/newsletters ​

Auth: Customer · Handler: fetchUserNewsletterSubscriptions · No params.


20. Utilities ​

20.1 POST /api/v1/user/mobile/uploadImage · PUT /api/v1/user/mobile/uploadImage ​

Auth: Customer · Handler: addToCloudinary (util_controller.js) — POST and PUT are the same handler.

multipart/form-data, any single field name (the first field is used, and its name becomes part of the Cloudinary filename). Max 10 MB. Query: type (string, optional) — appended to the Cloudinary folder path (user/<brand>/<type>).

Response is not the usual envelope: { "status": true, "result": { "url": "https://res.cloudinary.com/..." } }. Feed that url into userReceipt (§15.1), assets (§13.1), user_profile (§3.10), etc.

Batch platform, Shopify app and API documentation