Repository navigation
Document Storefront notifications, promotions and device endpoints - #64
Merged
Merged
Conversation
Add the customer notifications inbox (list, unread count, retrieve, mark
read, mark all read, delete, preferences), the public promotions ("deals")
endpoints, the cart promo code endpoints (apply, remove, preview), the
promo_codes checkout parameter, order discount meta, and the customer
unregister-device endpoint with the stricter register-device contract.
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the Fleetbase Storefront API collection for the public (customer-facing) endpoints added or changed in the Storefront notifications and promotions work.
Notificationobject: List Notifications (unread,type,limit,offset), Count Unread Notifications, Retrieve a Notification, Mark a Notification as Read, Mark All Notifications as Read, Delete a Notification, Get / Update Notification Preferences (order_updates,promotions). The folder description also covers the realtime channelcontact.{uuid}Promotionobject: Query Promotions (store), Retrieve a Promotion. Cart: Preview Cart Promotions, Apply Promotion Code to Cart (all refusal reasons documented), Remove Promotion Code from Cart, and a newpromo_codesfield on the Cart object. Checkout:promo_codes/promo_code/discount_codeon Before, Before Cash Pickup and Update Stripe Payment Intent, plus the new400refusal for unusable codes. Orders:discountandpromotionsorder metaplatform(ios/android), acceptsenvironment, and documents that a token moves to the latest customerint/v1) endpoints, which this repository does not documentWhile editing it, I also replaced the params of Update Stripe Payment Intent, which described unrelated
name/description/statusfields, with the parameters the endpoint actually reads.Related Issue
Follows fleetbase/storefront#102, #103 and #104 (all labelled
needs-api-spec).Type of Change
Implementation Notes
4500, Promotions5700), so{{customer_token}}is already set. Cart promo requests run right after Add Item to Cart (1100–1300).expected_status, documenting the refusal contract instead:404.400withcannot be applied.{{promo_code}}set in an environment, Apply Promotion Code to Cart exercises the success path.{{notification_id}}and Query Promotions sets{{promotion_id}}when results exist.promo_codeanddevice_tokenare optional.Validation
Not run against a live API. The endpoints aren't in a released Storefront yet. The requests' behavior was checked against the Storefront implementation and its unit tests; the Storefront contract workflow will exercise them once the PRs land.
Storefront's API Contract (Postman) workflow runs this collection (from
main) against the Storefront branch under test. Merge this only after fleetbase/storefront#102, #103 and #104 are merged. Otherwise the new requests would hit routes that don't exist yet and fail the contract check on every other Storefront PR.Documentation Impact
fleetbase/fleetbase.ioAPI Reference Impact
fleetbase/postmanAPI reference notes: all changes are in
postman/collections/Fleetbase Storefront API.Documentation Notes
fleetbase/fleetbase.ioneeds its Storefront API reference regenerated from this collection after merge, plus guide pages for notifications, promotions, promo codes and push setup.