Document customer API + Order Configs + service_quote on customer orders#7
Open
roncodes wants to merge 5 commits into
Open
Document customer API + Order Configs + service_quote on customer orders#7roncodes wants to merge 5 commits into
roncodes wants to merge 5 commits into
Conversation
Documents the new B2C customer surface added to FleetOps Api/v1 (see
fleetbase/fleetops PR feature/customer-api-v1) — 16 endpoints covering
verification-code signup, email/password + SMS login, password reset,
profile management, logout, push-device registration, customer-scoped
orders, and saved places.
All requests target the existing `{{base_url}}/{{namespace}}/customers/...`
pattern. Authenticated endpoints declare a `Customer-Token: {{customer_token}}`
header that the create / login / verify-code responses populate via their
afterResponse scripts.
Folder placed between Contacts (4000) and Drivers (7000) at order=5000.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The endpoint now accepts (optional) `name` and `phone` so the verification email is personalized and the pending user row carries real values from step 1 of the signup wizard. Matches fleetbase/fleetops#feature/customer-api-v1. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ses) Updates Create a Customer + Create a Customer Order docs to reflect the canonical Fleet-Ops shapes that the controller now strictly enforces: - Create a Customer accepts `place` as either an existing Place public_id or an inline Place object using the standard Place fillable shape (name, street1, street2, city, province, postal_code, neighborhood, district, building, country, phone, meta). No line1/state/zip aliases. - Create a Customer Order documents the canonical Order create shape — the same fields `POST /v1/orders` accepts from an operator: type / order_config / scheduled_at / notes / meta / internal_id, and either a `payload` (object or public_id) or top-level pickup / dropoff / return / waypoints / entities. No top-level item/value/mode/delivery/category aliases. customer_uuid is forced from the Customer-Token. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two doc additions paired with fleetbase/fleetops feature/customer-api-v1:
1. New "Order Configs" folder under Fleetbase API (order 8500, sitting
between Orders at 8000 and Organizations) documenting the new
read-only public resource:
- GET /v1/order-configs — list
- GET /v1/order-configs/{id} — find by uuid|public_id|namespace|key
Includes a `.resources/object.yaml` documenting the projected shape
(id/key/name/namespace + flow[] with canonical activity keys).
2. Customer object.yaml gains the `company` sub-object documenting the
public-safe projection of the API credential's tenant: id, name,
currency, country, phone. Currency resolution falls back through
companies.currency → ledger base_currency → "USD" via the canonical
Utils::getCompanyTransactionCurrency helper.
Also dropped the stale `meta.origin = "fleetops_customer_portal"` note
from the Customer object example, since the API no longer writes to
meta on the customer surface — meta is client-owned storage.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pairs with fleetbase/fleetops feature/customer-api-v1 which now accepts `service_quote` on the customer order create, resolving via the canonical ServiceQuote::resolveFromRequest and consuming the quote via $order->purchaseServiceQuote() to lock pricing onto the Order's PurchaseRate. Mirrors OrderController::create's behaviour. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Documents the new FleetOps customer API surface added in fleetbase/fleetops#249:
New `Customers` folder
16 endpoints covering verification-code signup, email/password + SMS login, password reset, profile management, logout, push-device registration, customer-scoped orders, and saved places.
New `Order Configs` folder (order 8500)
Convention adherence
All shapes are canonical Fleet-Ops field names — no client-portal aliases. The Customer object example was also cleaned of the stale `meta.origin` note since the API no longer writes to the customer's `meta` (it's client-owned).
Validation
```bash
node scripts/validate-collections.js
Validated 5 Postman Native Git collections and 3 environments.
```
Companion PRs
🤖 Generated with Claude Code