Repository navigation
Document order operations: payments, edits, stock, booking slots and comment visibility - #67
Merged
Merged
Conversation
…d booking slots
- Storefront Order: payment (and meta.payment) with its states and adjustments,
meta.booking, cancel_reason, tip amounts, address_change_request, and the
per-item meta the store sets (note, packed_at, unavailable, substitute_for,
added_by_edit).
- New Request Address Change (POST orders/{id}/address-change-request).
- Product: track_inventory, inventory and in_stock.
- New List Product Booking Slots (GET products/{id}/slots).
- Checkout initialize: 422 cart_items_unavailable and booking_slot_unavailable.
- Notifications: order_updated, and what order_canceled now says.
From fleetbase/fleetops#394 (release v0.6.72): - New Accept an Order and Decline an Order (POST orders/{id}/accept|decline). - Cancel an Order takes a reason. - Update an Order and Update a Payload: the status lock policy and its 422 locked response, entities_mode=replace, cod_amount at the top level and 0. - Entities: the 422 when the order's items are locked. - Order: the offer field; Orders folder: offers and the order.changed, order.driver_unassigned and order.offer_* realtime events. - The collection script honours expected_status, as the Storefront one does, so the offer requests can assert their 404 when a run has no offered order.
From fleetbase/core-api#306 (release v1.6.69): - Comments: visibility on create and on the resource; the public list and retrieve leave internal comments and replies out; comment.created event. - Chat: participant role and meta, message system and meta, null sender, and the Storefront order chat channel meta.
Fleet-Ops drops driver offers in fleetbase/fleetops#398. Remove the Accept an Order and Decline an Order requests and their examples, the offer field on the Order object, the order.offer_* realtime events and the offer_timeout_minutes setting. The Orders folder now explains that an assigned driver simply has the order and only ad hoc orders are offered to nearby drivers, taken with Start an Order and assign. The expected_status override added for the offer requests is reverted, as nothing else in the Fleetbase API collection uses it.
…acked unless marked unavailable
…ilable and order_balance_paid notifications; a moved booking's order_updated
The notification type list names both the activity and chat types from #65 and the order_updated, order_item_unavailable and order_balance_paid types.
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
Brings the API specification up to date with the order operations work shipped on 13 Oct 2026: order payments and edits, stock, booking slots, address change requests, and comment visibility. Every request, field, status code and error body was checked against the code (sources below), not only against the change summary.
release/v0.4.25: dffc7f6, 249f666, 1eec05e, 505cfff, 038fa19, f444390, b17b646, 77be74dpayment/meta.payment(states, amounts,payment_link,store_credit_code,adjustments),meta.booking,meta.cancel_reason,meta.tip_amount/delivery_tip_amount,meta.address_change_request, and per-itemmeta(note,unavailable,substitute_for,added_by_edit, ...). New Request Address Change (POST orders/{id}/address-change-request). Products:track_inventory,inventory,in_stock; new List Product Booking Slots (GET products/{id}/slots?date=). Checkout:422cart_items_unavailable(withitems[].available) andbooking_slot_unavailableon Before / Before Cash Pickup (and Update Stripe Payment Intent, which is mentioned under Before). Notifications:order_updated(including a moved booking, in the store's time),order_item_unavailable,order_balance_paid, and what anorder_canceledbody now says. New Balance Paid Callback (`GETrelease/v0.6.72), as amended by fleetbase/fleetops#398reasonon Cancel an Order. Update an Order and Update a Payload: the status lock policy, the422{ error, locked: { field: reason } }response (saved example),entities_mode=replace,cod_amounttop level and0. Entities create/update/delete: the items422. Orders folder: ad hoc orders (only they are offered to drivers) and the realtime eventsorder.changed,order.driver_unassignedfix/driver-channel-and-comment-visibility→release/v1.6.69)visibilityon create (validated) and on the resource; Query/Retrieve leave internal comments and replies out (404for an internal comment);comment.createdevent in the folder description. Chat Channels: participantrole/meta, messagesystem/meta,sender: null, Storefront order chat channelmetarelease/v0.4.25).main. Merge this after those releases are on the modules'mainbranches, so the new requests don't hit routes that don't exist yet.Possible overlap with #65 and #66
Orders/.resources/object.yaml,Products/.resources/object.yaml,Checkout/Before ❗.request.yamlandNotifications/.resources/object.yaml. I placed these edits away from Document Storefront verified reviews, promotion availability, order chat and add-on limits #65's lines (new fields appended, new paragraphs in other spots), so a clean merge is likely but not certain. Whichever lands second may need a small rebase.kindis not in this PR. The Order Chat folder exists only in Document Storefront verified reviews, promotion availability, order chat and add-on limits #65, so documentingkindhere would add the same six files a second time. The chat changes from 249f666/1eec05e need to go into Document Storefront verified reviews, promotion availability, order chat and add-on limits #65 or a follow-up after it merges:kind(driverdefault,customerfor the store chat) on all four requests,kindon the chat, participant/sender rolescustomer|driver|store|system, messagesystemandkind(e.g.address_change_requested), and the409chat_unavailable. A ready patch against Document Storefront verified reviews, promotion availability, order chat and add-on limits #65's head is available.Related Issue
None. Follows the PRs listed above.
Type of Change
Implementation Notes
{{address_change_order_id}}(an open delivery order of the run's customer), optional{{place_id}}. Otherwise404.{{service_product_id}}(a bookable service), optional{{slot_date}}(defaults to today, UTC). Otherwise404for the run's non-bookable product.locked), as that collection uses them. Storefront responses are described in the request descriptions, as that collection does.order.changed,order.driver_unassigned) and Core Comments (comment.created).Validation
$ npm run postman:lint Validated 5 Postman Native Git collections and 3 environments. Linting Fleetbase API... No issues found. Scanned: 246 | Errors: 0 | Warnings: 0 Linting Fleetbase Core API... No issues found. Scanned: 24 | Errors: 0 | Warnings: 0 Linting Fleetbase Integrated Vendor Flow... No issues found. Scanned: 7 | Errors: 0 | Warnings: 0 Linting Fleetbase Ledger API... No issues found. Scanned: 8 | Errors: 0 | Warnings: 0 Linting Fleetbase Storefront API... No issues found. Scanned: 78 | Errors: 0 | Warnings: 0404JSON. They addressed the placeholder ids, sent the expected bodies (Request Address Change dropped the unsetplace, and slots sent today's date), and passed withexpected_status: 2 requests / 6 assertions / 0 failed.postman:run:*scripts need a running Fleetbase stack with these unreleased versions. The module contract workflows will run them once the releases land.Documentation Impact
fleetbase/fleetbase.ioAPI Reference Impact
fleetbase/postmanAPI reference notes: changes are in
postman/collections/Fleetbase Storefront API,Fleetbase APIandFleetbase Core API. After merge, fleetbase.io regenerates its API reference from this repo through the bump-postman workflow.Documentation Notes
Guide pages in
fleetbase/fleetbase.iothat should follow (not part of this PR):order.changed,order.driver_unassigned(Fleet-Ops),comment.created(Core). Channels and payloads are written out in the Orders and Comments folder descriptions here.storefront/int/v1) are not documented in this repo.Risk
Documentation only. The main risk is merging before the module releases (see above).
Screenshots / Recordings
None.