From 25d2b68eca27b6e07103ec03cd4ad1d566687146 Mon Sep 17 00:00:00 2001 From: "Ronald A. Richardson" Date: Thu, 21 May 2026 16:01:38 +0800 Subject: [PATCH 1/5] Add Customers folder to Fleetbase API collection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .../Customers/.resources/definition.yaml | 4 ++ .../Customers/.resources/object.yaml | 70 +++++++++++++++++++ .../Create a Customer Order.params.yaml | 54 ++++++++++++++ .../Create a Customer Order.request.yaml | 49 +++++++++++++ .../Customers/Create a Customer.params.yaml | 38 ++++++++++ .../Customers/Create a Customer.request.yaml | 32 +++++++++ .../Forgot Customer Password.params.yaml | 6 ++ .../Forgot Customer Password.request.yaml | 13 ++++ .../List Customer Orders.queryParams.yaml | 18 +++++ .../List Customer Orders.request.yaml | 10 +++ .../List Customer Places.queryParams.yaml | 14 ++++ .../List Customer Places.request.yaml | 10 +++ .../Customers/Login Customer.params.yaml | 10 +++ .../Customers/Login Customer.request.yaml | 25 +++++++ .../Logout All Customer Sessions.request.yaml | 10 +++ .../Customers/Logout Customer.request.yaml | 10 +++ .../Register Customer Device.params.yaml | 10 +++ .../Register Customer Device.request.yaml | 17 +++++ ...Request Customer Creation Code.params.yaml | 10 +++ ...equest Customer Creation Code.request.yaml | 14 ++++ .../Request Customer Login SMS.params.yaml | 6 ++ .../Request Customer Login SMS.request.yaml | 13 ++++ .../Reset Customer Password.params.yaml | 14 ++++ .../Reset Customer Password.request.yaml | 15 ++++ ...trieve Authenticated Customer.request.yaml | 10 +++ .../Retrieve a Customer Order.request.yaml | 10 +++ .../Update Authenticated Customer.params.yaml | 26 +++++++ ...Update Authenticated Customer.request.yaml | 18 +++++ .../Verify Customer Login Code.params.yaml | 14 ++++ .../Verify Customer Login Code.request.yaml | 27 +++++++ 30 files changed, 577 insertions(+) create mode 100644 postman/collections/Fleetbase API/Customers/.resources/definition.yaml create mode 100644 postman/collections/Fleetbase API/Customers/.resources/object.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Create a Customer Order.params.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Create a Customer Order.request.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Create a Customer.params.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Create a Customer.request.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Forgot Customer Password.params.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Forgot Customer Password.request.yaml create mode 100644 postman/collections/Fleetbase API/Customers/List Customer Orders.queryParams.yaml create mode 100644 postman/collections/Fleetbase API/Customers/List Customer Orders.request.yaml create mode 100644 postman/collections/Fleetbase API/Customers/List Customer Places.queryParams.yaml create mode 100644 postman/collections/Fleetbase API/Customers/List Customer Places.request.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Login Customer.params.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Login Customer.request.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Logout All Customer Sessions.request.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Logout Customer.request.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Register Customer Device.params.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Register Customer Device.request.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Request Customer Creation Code.params.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Request Customer Creation Code.request.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Request Customer Login SMS.params.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Request Customer Login SMS.request.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Reset Customer Password.params.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Reset Customer Password.request.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Retrieve Authenticated Customer.request.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Retrieve a Customer Order.request.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Update Authenticated Customer.params.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Update Authenticated Customer.request.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Verify Customer Login Code.params.yaml create mode 100644 postman/collections/Fleetbase API/Customers/Verify Customer Login Code.request.yaml diff --git a/postman/collections/Fleetbase API/Customers/.resources/definition.yaml b/postman/collections/Fleetbase API/Customers/.resources/definition.yaml new file mode 100644 index 0000000..e9fb66b --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/.resources/definition.yaml @@ -0,0 +1,4 @@ +$kind: collection +description: |- + Customer endpoints provide email/password + verification-code authentication and customer-scoped order management for FleetOps, without requiring the Storefront publishable key. All flows authenticate to a single Fleetbase company resolved from your `flb_live_…` API credential; per-customer requests additionally require the `Customer-Token` returned by signup/login. +order: 5000 diff --git a/postman/collections/Fleetbase API/Customers/.resources/object.yaml b/postman/collections/Fleetbase API/Customers/.resources/object.yaml new file mode 100644 index 0000000..1ff0787 --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/.resources/object.yaml @@ -0,0 +1,70 @@ +$kind: object +name: Customer +description: |- + A customer is a Fleet-Ops contact of `type=customer` that is linked to a user for authentication. Returned by all `/v1/customers/...` endpoints. The `token` field is only present on responses to signup, login, and verify-code; persist it client-side and send it on subsequent requests via the `Customer-Token` header. +example: | + { + "id": "customer_A1b2C3d4E5", + "internal_id": null, + "name": "Jane Customer", + "title": null, + "email": "jane@example.com", + "phone": "+15555550111", + "photo_url": null, + "address": null, + "addresses": [], + "token": "1|f4Wd3jY9aB...", + "orders_count": 0, + "meta": { + "origin": "fleetops_customer_portal" + }, + "slug": "jane-customer", + "created_at": "2026-05-21T10:00:00.000000Z", + "updated_at": "2026-05-21T10:00:00.000000Z" + } +fields: + - name: id + type: string + description: Public customer identifier. Prefixed `customer_` on the public API. + - name: internal_id + type: string + description: Optional internal identifier. + - name: name + type: string + description: Customer display name. + - name: title + type: string + description: Optional title. + - name: email + type: string + description: Customer email address. + - name: phone + type: string + description: Customer phone number (E.164 format). + - name: photo_url + type: string + description: Customer photo URL. + - name: address + type: string + description: Default address derived from the linked place, when one is set. + - name: addresses + type: array of objects + description: Saved Place addresses, when the `places` relation is loaded. + - name: token + type: string + description: Sanctum personal-access-token returned by signup/login/verify-code. Send back on authenticated requests as the `Customer-Token` header. + - name: orders_count + type: integer + description: Number of non-deleted orders linked to this customer. + - name: meta + type: object + description: Free-form metadata. Customer-portal-created accounts ship `meta.origin = "fleetops_customer_portal"` for distinguishability from operator-created contacts. + - name: slug + type: string + description: URL-friendly slug. + - name: created_at + type: timestamp + description: When the customer was created. + - name: updated_at + type: timestamp + description: When the customer was last updated. diff --git a/postman/collections/Fleetbase API/Customers/Create a Customer Order.params.yaml b/postman/collections/Fleetbase API/Customers/Create a Customer Order.params.yaml new file mode 100644 index 0000000..04abf54 --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Create a Customer Order.params.yaml @@ -0,0 +1,54 @@ +$kind: params +fields: + - name: item + type: string + required: true + description: Item / cargo name. + - name: weight + type: number + required: true + description: Item weight. + - name: weight_unit + type: string + required: false + description: Unit for `weight`. One of `lb`, `kg`, `g`, `oz`. Defaults to `lb`. + - name: value + type: number + required: true + description: Declared value (used for duty estimation). + - name: currency + type: string + required: false + description: ISO-4217 currency code for `value`. Defaults to `USD`. + - name: category + type: string + required: false + description: Free-form category (e.g. `Electronics`, `Documents`). + - name: mode + type: string + required: false + description: Shipping mode. One of `Ocean`, `Air`, `Ground`. Defaults to `Ocean`. + - name: delivery + type: boolean + required: false + description: Whether last-mile delivery is required (vs. depot pickup). + - name: notes + type: string + required: false + description: Free-form notes / special handling instructions. + - name: scheduled_at + type: timestamp + required: false + description: Requested fulfillment timestamp. + - name: pickup + type: object + required: false + description: Either a Place public id, or an inline address object (`name`, `street1`, `city`, `province`, `postal_code`, `country`). + - name: dropoff + type: object + required: false + description: Either a Place public id, or an inline address object. + - name: meta + type: object + required: false + description: Free-form metadata merged onto the resulting order's `meta`. diff --git a/postman/collections/Fleetbase API/Customers/Create a Customer Order.request.yaml b/postman/collections/Fleetbase API/Customers/Create a Customer Order.request.yaml new file mode 100644 index 0000000..bd899ee --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Create a Customer Order.request.yaml @@ -0,0 +1,49 @@ +$kind: http-request +name: "Create a Customer Order" +description: |- + Creates a freight order on behalf of the authenticated customer. The customer's `uuid` is automatically attached as `orders.customer_uuid`, and the order is created in the same company resolved from the API credential. Accepts a lightweight portal-friendly body; the controller maps it into a full FleetOps payload/entity under the company's default `OrderConfig`. +url: "{{base_url}}/{{namespace}}/customers/orders" +method: POST +headers: + Accept: application/json + Customer-Token: "{{customer_token}}" +body: + type: json + content: |- + { + "item": "Wireless Headphones", + "weight": 2.5, + "weight_unit": "lb", + "value": 150, + "currency": "USD", + "category": "Electronics", + "mode": "Ocean", + "delivery": true, + "scheduled_at": "2026-05-25T10:00:00Z", + "pickup": { + "name": "Ultra Warehouse", + "street1": "4169 N State RD 7", + "city": "Lauderdale Lakes", + "province": "FL", + "postal_code": "33319", + "country": "US" + }, + "dropoff": { + "name": "Customer Address", + "city": "Kingston", + "country": "JM" + }, + "notes": "Handle with care." + } +scripts: + - type: afterResponse + code: |- + var json_response = pm.response.json(); + let cv = pm.environment; + + if (json_response && json_response.id) { + cv.set("customer_order_id", json_response.id); + } + language: text/javascript + +order: 14000 diff --git a/postman/collections/Fleetbase API/Customers/Create a Customer.params.yaml b/postman/collections/Fleetbase API/Customers/Create a Customer.params.yaml new file mode 100644 index 0000000..5b09605 --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Create a Customer.params.yaml @@ -0,0 +1,38 @@ +$kind: params +fields: + - name: identity + type: string + required: true + description: Email or phone the verification code was requested for. + - name: code + type: string + required: true + description: Verification code received via email or SMS. + - name: name + type: string + required: true + description: Customer display name. + - name: password + type: string + required: true + description: Account password (minimum 8 characters). + - name: email + type: string + required: false + description: Email address, if different from the identity. Must be unique within the company. + - name: phone + type: string + required: false + description: Phone number (E.164 recommended). Must be unique within the company. + - name: title + type: string + required: false + description: Optional title. + - name: photo + type: string + required: false + description: Either a `file_…` public id or a base64-encoded data URI. + - name: meta + type: object + required: false + description: Free-form metadata. `meta.origin` is auto-set to `fleetops_customer_portal`. diff --git a/postman/collections/Fleetbase API/Customers/Create a Customer.request.yaml b/postman/collections/Fleetbase API/Customers/Create a Customer.request.yaml new file mode 100644 index 0000000..7a20400 --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Create a Customer.request.yaml @@ -0,0 +1,32 @@ +$kind: http-request +name: "Create a Customer" +description: |- + Creates a customer account (Contact + linked User) after verifying the code from `Request Customer Creation Code`. Returns the customer with a Sanctum `token` — persist this client-side and send it back as the `Customer-Token` header on authenticated requests. +url: "{{base_url}}/{{namespace}}/customers" +method: POST +body: + type: json + content: |- + { + "identity": "{{customer_identity}}", + "code": "{{verification_code}}", + "name": "Jane Customer", + "password": "{{customer_password}}", + "phone": "{{$randomPhoneNumber}}" + } +scripts: + - type: afterResponse + code: |- + var json_response = pm.response.json(); + let cv = pm.environment; + + if (json_response && json_response.id) { + cv.set("customer_id", json_response.id); + cv.set("customer_name", json_response.name); + if (json_response.token) { + cv.set("customer_token", json_response.token); + } + } + language: text/javascript + +order: 2000 diff --git a/postman/collections/Fleetbase API/Customers/Forgot Customer Password.params.yaml b/postman/collections/Fleetbase API/Customers/Forgot Customer Password.params.yaml new file mode 100644 index 0000000..041cf49 --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Forgot Customer Password.params.yaml @@ -0,0 +1,6 @@ +$kind: params +fields: + - name: identity + type: string + required: true + description: Customer email or phone number to send the reset code to. diff --git a/postman/collections/Fleetbase API/Customers/Forgot Customer Password.request.yaml b/postman/collections/Fleetbase API/Customers/Forgot Customer Password.request.yaml new file mode 100644 index 0000000..49ed2f4 --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Forgot Customer Password.request.yaml @@ -0,0 +1,13 @@ +$kind: http-request +name: "Forgot Customer Password" +description: "Sends a password-reset verification code to the customer's email or phone. Always returns `{ status: ok }` regardless of whether the identity matches an account (prevents enumeration)." +url: "{{base_url}}/{{namespace}}/customers/forgot-password" +method: POST +body: + type: json + content: |- + { + "identity": "{{customer_identity}}" + } + +order: 6000 diff --git a/postman/collections/Fleetbase API/Customers/List Customer Orders.queryParams.yaml b/postman/collections/Fleetbase API/Customers/List Customer Orders.queryParams.yaml new file mode 100644 index 0000000..b7bb2fb --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/List Customer Orders.queryParams.yaml @@ -0,0 +1,18 @@ +$kind: params +fields: + - name: limit + type: integer + required: false + description: Page size. + - name: offset + type: integer + required: false + description: Page offset. + - name: status + type: string + required: false + description: Filter by order status (e.g. `created`, `dispatched`, `completed`). + - name: query + type: string + required: false + description: Free-text search across order fields. diff --git a/postman/collections/Fleetbase API/Customers/List Customer Orders.request.yaml b/postman/collections/Fleetbase API/Customers/List Customer Orders.request.yaml new file mode 100644 index 0000000..2761585 --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/List Customer Orders.request.yaml @@ -0,0 +1,10 @@ +$kind: http-request +name: "List Customer Orders" +description: "Lists orders owned by the authenticated customer (scoped to `orders.customer_uuid`)." +url: "{{base_url}}/{{namespace}}/customers/orders" +method: GET +headers: + Accept: application/json + Customer-Token: "{{customer_token}}" + +order: 13000 diff --git a/postman/collections/Fleetbase API/Customers/List Customer Places.queryParams.yaml b/postman/collections/Fleetbase API/Customers/List Customer Places.queryParams.yaml new file mode 100644 index 0000000..0707c2d --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/List Customer Places.queryParams.yaml @@ -0,0 +1,14 @@ +$kind: params +fields: + - name: limit + type: integer + required: false + description: Page size. + - name: offset + type: integer + required: false + description: Page offset. + - name: query + type: string + required: false + description: Free-text search against Place fields. diff --git a/postman/collections/Fleetbase API/Customers/List Customer Places.request.yaml b/postman/collections/Fleetbase API/Customers/List Customer Places.request.yaml new file mode 100644 index 0000000..0f0d9cc --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/List Customer Places.request.yaml @@ -0,0 +1,10 @@ +$kind: http-request +name: "List Customer Places" +description: "Lists the authenticated customer's saved Places (delivery addresses, etc.)." +url: "{{base_url}}/{{namespace}}/customers/places" +method: GET +headers: + Accept: application/json + Customer-Token: "{{customer_token}}" + +order: 12000 diff --git a/postman/collections/Fleetbase API/Customers/Login Customer.params.yaml b/postman/collections/Fleetbase API/Customers/Login Customer.params.yaml new file mode 100644 index 0000000..30e6dcb --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Login Customer.params.yaml @@ -0,0 +1,10 @@ +$kind: params +fields: + - name: identity + type: string + required: true + description: Customer email or phone number. + - name: password + type: string + required: true + description: Customer account password. diff --git a/postman/collections/Fleetbase API/Customers/Login Customer.request.yaml b/postman/collections/Fleetbase API/Customers/Login Customer.request.yaml new file mode 100644 index 0000000..77c3497 --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Login Customer.request.yaml @@ -0,0 +1,25 @@ +$kind: http-request +name: "Login Customer" +description: "Authenticates a customer with email/phone + password. Returns the customer with a Sanctum `token` to use as `Customer-Token`." +url: "{{base_url}}/{{namespace}}/customers/login" +method: POST +body: + type: json + content: |- + { + "identity": "{{customer_identity}}", + "password": "{{customer_password}}" + } +scripts: + - type: afterResponse + code: |- + var json_response = pm.response.json(); + let cv = pm.environment; + + if (json_response && json_response.token) { + cv.set("customer_token", json_response.token); + cv.set("customer_id", json_response.id); + } + language: text/javascript + +order: 3000 diff --git a/postman/collections/Fleetbase API/Customers/Logout All Customer Sessions.request.yaml b/postman/collections/Fleetbase API/Customers/Logout All Customer Sessions.request.yaml new file mode 100644 index 0000000..3b286e0 --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Logout All Customer Sessions.request.yaml @@ -0,0 +1,10 @@ +$kind: http-request +name: "Logout All Customer Sessions" +description: "Revokes every Sanctum token issued to the customer's linked user (sign out everywhere)." +url: "{{base_url}}/{{namespace}}/customers/logout-all" +method: POST +headers: + Accept: application/json + Customer-Token: "{{customer_token}}" + +order: 10500 diff --git a/postman/collections/Fleetbase API/Customers/Logout Customer.request.yaml b/postman/collections/Fleetbase API/Customers/Logout Customer.request.yaml new file mode 100644 index 0000000..a1bb01f --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Logout Customer.request.yaml @@ -0,0 +1,10 @@ +$kind: http-request +name: "Logout Customer" +description: "Revokes the Sanctum token used to make this request. The customer's other active sessions are unaffected — use `Logout All Customer Sessions` to revoke every token for the linked user." +url: "{{base_url}}/{{namespace}}/customers/logout" +method: POST +headers: + Accept: application/json + Customer-Token: "{{customer_token}}" + +order: 10000 diff --git a/postman/collections/Fleetbase API/Customers/Register Customer Device.params.yaml b/postman/collections/Fleetbase API/Customers/Register Customer Device.params.yaml new file mode 100644 index 0000000..69318c3 --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Register Customer Device.params.yaml @@ -0,0 +1,10 @@ +$kind: params +fields: + - name: token + type: string + required: true + description: APNs / FCM device token to register. + - name: platform + type: string + required: true + description: Device platform. One of `ios`, `android`, or `web`. `os` is accepted as an alias. diff --git a/postman/collections/Fleetbase API/Customers/Register Customer Device.request.yaml b/postman/collections/Fleetbase API/Customers/Register Customer Device.request.yaml new file mode 100644 index 0000000..2b10c32 --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Register Customer Device.request.yaml @@ -0,0 +1,17 @@ +$kind: http-request +name: "Register Customer Device" +description: "Registers a push-notification device token against the authenticated customer's linked user." +url: "{{base_url}}/{{namespace}}/customers/register-device" +method: POST +headers: + Accept: application/json + Customer-Token: "{{customer_token}}" +body: + type: json + content: |- + { + "token": "{{push_token}}", + "platform": "ios" + } + +order: 11000 diff --git a/postman/collections/Fleetbase API/Customers/Request Customer Creation Code.params.yaml b/postman/collections/Fleetbase API/Customers/Request Customer Creation Code.params.yaml new file mode 100644 index 0000000..a364114 --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Request Customer Creation Code.params.yaml @@ -0,0 +1,10 @@ +$kind: params +fields: + - name: identity + type: string + required: true + description: Customer email address or phone number to send the verification code to. + - name: mode + type: string + required: true + description: Channel to send the code through. One of `email` or `sms`. diff --git a/postman/collections/Fleetbase API/Customers/Request Customer Creation Code.request.yaml b/postman/collections/Fleetbase API/Customers/Request Customer Creation Code.request.yaml new file mode 100644 index 0000000..cd56439 --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Request Customer Creation Code.request.yaml @@ -0,0 +1,14 @@ +$kind: http-request +name: "Request Customer Creation Code" +description: "Sends an email or SMS verification code to start a customer signup. Required before calling `Create a Customer`." +url: "{{base_url}}/{{namespace}}/customers/request-creation-code" +method: POST +body: + type: json + content: |- + { + "identity": "{{customer_identity}}", + "mode": "email" + } + +order: 1000 diff --git a/postman/collections/Fleetbase API/Customers/Request Customer Login SMS.params.yaml b/postman/collections/Fleetbase API/Customers/Request Customer Login SMS.params.yaml new file mode 100644 index 0000000..bd73aec --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Request Customer Login SMS.params.yaml @@ -0,0 +1,6 @@ +$kind: params +fields: + - name: phone + type: string + required: true + description: Customer phone number (E.164 recommended). `identity` is also accepted. diff --git a/postman/collections/Fleetbase API/Customers/Request Customer Login SMS.request.yaml b/postman/collections/Fleetbase API/Customers/Request Customer Login SMS.request.yaml new file mode 100644 index 0000000..a31b9da --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Request Customer Login SMS.request.yaml @@ -0,0 +1,13 @@ +$kind: http-request +name: "Request Customer Login SMS" +description: "Starts SMS-based passwordless login by sending a verification code to the customer's phone. Falls back to email if SMS delivery fails and an email is on file." +url: "{{base_url}}/{{namespace}}/customers/login-with-sms" +method: POST +body: + type: json + content: |- + { + "phone": "{{customer_phone}}" + } + +order: 4000 diff --git a/postman/collections/Fleetbase API/Customers/Reset Customer Password.params.yaml b/postman/collections/Fleetbase API/Customers/Reset Customer Password.params.yaml new file mode 100644 index 0000000..5b098f0 --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Reset Customer Password.params.yaml @@ -0,0 +1,14 @@ +$kind: params +fields: + - name: identity + type: string + required: true + description: Email or phone the reset code was sent to. + - name: code + type: string + required: true + description: Reset verification code. + - name: password + type: string + required: true + description: New password (minimum 8 characters). diff --git a/postman/collections/Fleetbase API/Customers/Reset Customer Password.request.yaml b/postman/collections/Fleetbase API/Customers/Reset Customer Password.request.yaml new file mode 100644 index 0000000..0762bcd --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Reset Customer Password.request.yaml @@ -0,0 +1,15 @@ +$kind: http-request +name: "Reset Customer Password" +description: "Verifies the reset code from `Forgot Customer Password` and sets a new password. All existing tokens for the customer's user are revoked on success." +url: "{{base_url}}/{{namespace}}/customers/reset-password" +method: POST +body: + type: json + content: |- + { + "identity": "{{customer_identity}}", + "code": "{{verification_code}}", + "password": "{{customer_password}}" + } + +order: 7000 diff --git a/postman/collections/Fleetbase API/Customers/Retrieve Authenticated Customer.request.yaml b/postman/collections/Fleetbase API/Customers/Retrieve Authenticated Customer.request.yaml new file mode 100644 index 0000000..2934bfb --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Retrieve Authenticated Customer.request.yaml @@ -0,0 +1,10 @@ +$kind: http-request +name: "Retrieve Authenticated Customer" +description: "Returns the profile of the customer identified by the `Customer-Token` header." +url: "{{base_url}}/{{namespace}}/customers/me" +method: GET +headers: + Accept: application/json + Customer-Token: "{{customer_token}}" + +order: 8000 diff --git a/postman/collections/Fleetbase API/Customers/Retrieve a Customer Order.request.yaml b/postman/collections/Fleetbase API/Customers/Retrieve a Customer Order.request.yaml new file mode 100644 index 0000000..a1d9b12 --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Retrieve a Customer Order.request.yaml @@ -0,0 +1,10 @@ +$kind: http-request +name: "Retrieve a Customer Order" +description: "Fetches a single order by id, public id, or tracking number. Returns 404 if the order doesn't belong to the authenticated customer." +url: "{{base_url}}/{{namespace}}/customers/orders/{{customer_order_id}}" +method: GET +headers: + Accept: application/json + Customer-Token: "{{customer_token}}" + +order: 15000 diff --git a/postman/collections/Fleetbase API/Customers/Update Authenticated Customer.params.yaml b/postman/collections/Fleetbase API/Customers/Update Authenticated Customer.params.yaml new file mode 100644 index 0000000..8a21e8e --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Update Authenticated Customer.params.yaml @@ -0,0 +1,26 @@ +$kind: params +fields: + - name: name + type: string + required: false + description: New display name. + - name: title + type: string + required: false + description: New title. + - name: email + type: string + required: false + description: New email. Mirrored to the linked user. + - name: phone + type: string + required: false + description: New phone (E.164 recommended). Mirrored to the linked user. + - name: photo + type: string + required: false + description: Either a `file_…` public id, a base64-encoded data URI, or the literal string `REMOVE` to clear the photo. + - name: meta + type: object + required: false + description: Free-form metadata patch. diff --git a/postman/collections/Fleetbase API/Customers/Update Authenticated Customer.request.yaml b/postman/collections/Fleetbase API/Customers/Update Authenticated Customer.request.yaml new file mode 100644 index 0000000..6e2f44a --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Update Authenticated Customer.request.yaml @@ -0,0 +1,18 @@ +$kind: http-request +name: "Update Authenticated Customer" +description: "Updates the authenticated customer's profile. Changes to `name`, `email`, and `phone` are mirrored onto the linked user so subsequent logins work." +url: "{{base_url}}/{{namespace}}/customers/me" +method: PUT +headers: + Accept: application/json + Customer-Token: "{{customer_token}}" +body: + type: json + content: |- + { + "name": "{{customer_name}}", + "phone": "{{customer_phone}}", + "email": "{{customer_email}}" + } + +order: 9000 diff --git a/postman/collections/Fleetbase API/Customers/Verify Customer Login Code.params.yaml b/postman/collections/Fleetbase API/Customers/Verify Customer Login Code.params.yaml new file mode 100644 index 0000000..6294862 --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Verify Customer Login Code.params.yaml @@ -0,0 +1,14 @@ +$kind: params +fields: + - name: identity + type: string + required: true + description: Email or phone the code was sent to. + - name: code + type: string + required: true + description: Verification code received via SMS or email. + - name: for + type: string + required: false + description: Verification slug. Defaults to `fleetops_customer_login`. Set to `fleetops_create_customer` to complete a signup flow that started with `Request Customer Creation Code`. diff --git a/postman/collections/Fleetbase API/Customers/Verify Customer Login Code.request.yaml b/postman/collections/Fleetbase API/Customers/Verify Customer Login Code.request.yaml new file mode 100644 index 0000000..0ba2492 --- /dev/null +++ b/postman/collections/Fleetbase API/Customers/Verify Customer Login Code.request.yaml @@ -0,0 +1,27 @@ +$kind: http-request +name: "Verify Customer Login Code" +description: |- + Verifies the SMS/email code from `Request Customer Login SMS` and returns the customer with a Sanctum `token`. When `for` is `fleetops_create_customer` this proxies to `Create a Customer`. +url: "{{base_url}}/{{namespace}}/customers/verify-code" +method: POST +body: + type: json + content: |- + { + "identity": "{{customer_identity}}", + "code": "{{verification_code}}", + "for": "fleetops_customer_login" + } +scripts: + - type: afterResponse + code: |- + var json_response = pm.response.json(); + let cv = pm.environment; + + if (json_response && json_response.token) { + cv.set("customer_token", json_response.token); + cv.set("customer_id", json_response.id); + } + language: text/javascript + +order: 5000 From dc4292092bac3db1274db9f791f6d1842ad511ae Mon Sep 17 00:00:00 2001 From: "Ronald A. Richardson" Date: Thu, 21 May 2026 17:06:38 +0800 Subject: [PATCH 2/5] Customers/request-creation-code: document optional name + phone 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) --- .../Customers/Request Customer Creation Code.params.yaml | 8 ++++++++ .../Customers/Request Customer Creation Code.request.yaml | 7 +++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/postman/collections/Fleetbase API/Customers/Request Customer Creation Code.params.yaml b/postman/collections/Fleetbase API/Customers/Request Customer Creation Code.params.yaml index a364114..f3b1d3b 100644 --- a/postman/collections/Fleetbase API/Customers/Request Customer Creation Code.params.yaml +++ b/postman/collections/Fleetbase API/Customers/Request Customer Creation Code.params.yaml @@ -8,3 +8,11 @@ fields: type: string required: true description: Channel to send the code through. One of `email` or `sms`. + - name: name + type: string + required: false + description: Customer display name. When supplied, the verification email greets the customer by name and the pending user record is seeded with this value (avoids a "Pending Customer" placeholder). + - name: phone + type: string + required: false + description: Phone number (E.164 recommended). Pre-seeded on the pending user record alongside the email identity. diff --git a/postman/collections/Fleetbase API/Customers/Request Customer Creation Code.request.yaml b/postman/collections/Fleetbase API/Customers/Request Customer Creation Code.request.yaml index cd56439..0612440 100644 --- a/postman/collections/Fleetbase API/Customers/Request Customer Creation Code.request.yaml +++ b/postman/collections/Fleetbase API/Customers/Request Customer Creation Code.request.yaml @@ -1,6 +1,7 @@ $kind: http-request name: "Request Customer Creation Code" -description: "Sends an email or SMS verification code to start a customer signup. Required before calling `Create a Customer`." +description: |- + Sends an email or SMS verification code to start a customer signup. Required before calling `Create a Customer`. Optionally include `name` and `phone` so the verification email greets the customer by name and the pending user row is pre-seeded with real values. url: "{{base_url}}/{{namespace}}/customers/request-creation-code" method: POST body: @@ -8,7 +9,9 @@ body: content: |- { "identity": "{{customer_identity}}", - "mode": "email" + "mode": "email", + "name": "{{customer_name}}", + "phone": "{{customer_phone}}" } order: 1000 From c0a81fbbef14d2276432eebc27dc53734f06b7ba Mon Sep 17 00:00:00 2001 From: "Ronald A. Richardson" Date: Thu, 21 May 2026 17:38:13 +0800 Subject: [PATCH 3/5] Customers: canonical Place + canonical Order shapes (drop portal aliases) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .../Create a Customer Order.params.yaml | 72 +++++++++---------- .../Create a Customer Order.request.yaml | 27 +++---- .../Customers/Create a Customer.params.yaml | 7 +- .../Customers/Create a Customer.request.yaml | 10 ++- 4 files changed, 65 insertions(+), 51 deletions(-) diff --git a/postman/collections/Fleetbase API/Customers/Create a Customer Order.params.yaml b/postman/collections/Fleetbase API/Customers/Create a Customer Order.params.yaml index 04abf54..6893e45 100644 --- a/postman/collections/Fleetbase API/Customers/Create a Customer Order.params.yaml +++ b/postman/collections/Fleetbase API/Customers/Create a Customer Order.params.yaml @@ -1,54 +1,52 @@ $kind: params fields: - - name: item - type: string - required: true - description: Item / cargo name. - - name: weight - type: number - required: true - description: Item weight. - - name: weight_unit - type: string - required: false - description: Unit for `weight`. One of `lb`, `kg`, `g`, `oz`. Defaults to `lb`. - - name: value - type: number - required: true - description: Declared value (used for duty estimation). - - name: currency - type: string - required: false - description: ISO-4217 currency code for `value`. Defaults to `USD`. - - name: category + - name: type type: string required: false - description: Free-form category (e.g. `Electronics`, `Documents`). - - name: mode + description: Order config key (e.g. `transport`, `freight`). When omitted, the company's default OrderConfig is used. + - name: order_config type: string required: false - description: Shipping mode. One of `Ocean`, `Air`, `Ground`. Defaults to `Ocean`. - - name: delivery - type: boolean + description: Explicit OrderConfig public id, overrides `type`. + - name: scheduled_at + type: timestamp required: false - description: Whether last-mile delivery is required (vs. depot pickup). + description: Requested fulfillment timestamp (ISO 8601). - name: notes type: string required: false description: Free-form notes / special handling instructions. - - name: scheduled_at - type: timestamp + - name: internal_id + type: string required: false - description: Requested fulfillment timestamp. - - name: pickup + description: Optional caller-supplied identifier. + - name: meta type: object required: false - description: Either a Place public id, or an inline address object (`name`, `street1`, `city`, `province`, `postal_code`, `country`). + description: Free-form metadata stored on the order's `meta` column. + - name: payload + type: string|object + required: false + description: |- + Either an existing Payload public_id, or an inline object with `{ pickup, dropoff, return, waypoints, entities }`. The controller mirrors `OrderController::create`'s payload-building branch — Place sub-objects accept either a public_id or the standard Place fillable shape; entities accept the standard Entity fillable shape. + - name: pickup + type: string|object + required: false + description: Accepted only when `payload` is not provided. Either an existing Place public_id or a Place-shaped object (`name`, `street1`, `street2`, `city`, `province`, `postal_code`, `country`, `phone`, `meta`). - name: dropoff - type: object + type: string|object required: false - description: Either a Place public id, or an inline address object. - - name: meta - type: object + description: Same shape as `pickup`. Accepted only when `payload` is not provided. + - name: return + type: string|object + required: false + description: Same shape as `pickup`. Accepted only when `payload` is not provided. + - name: waypoints + type: array of strings|objects + required: false + description: Accepted only when `payload` is not provided. Each item is either a Place public_id or a Place-shaped object. + - name: entities + type: array of objects required: false - description: Free-form metadata merged onto the resulting order's `meta`. + description: |- + Accepted only when `payload` is not provided. Each entity uses the standard Entity field shape: `name`, `description`, `weight`, `weight_unit`, `declared_value`, `currency`, `meta`. The controller delegates to `Payload::setEntities` so customer-created orders are indistinguishable from operator-created ones at the data layer. diff --git a/postman/collections/Fleetbase API/Customers/Create a Customer Order.request.yaml b/postman/collections/Fleetbase API/Customers/Create a Customer Order.request.yaml index bd899ee..ae1a094 100644 --- a/postman/collections/Fleetbase API/Customers/Create a Customer Order.request.yaml +++ b/postman/collections/Fleetbase API/Customers/Create a Customer Order.request.yaml @@ -1,7 +1,7 @@ $kind: http-request name: "Create a Customer Order" description: |- - Creates a freight order on behalf of the authenticated customer. The customer's `uuid` is automatically attached as `orders.customer_uuid`, and the order is created in the same company resolved from the API credential. Accepts a lightweight portal-friendly body; the controller maps it into a full FleetOps payload/entity under the company's default `OrderConfig`. + Creates an Order on behalf of the authenticated customer. Accepts the canonical Fleet-Ops Order create shape — the same fields as `POST /v1/orders` would accept from an operator. The customer's `uuid` is automatically attached as `orders.customer_uuid`; any client-supplied `customer` field is ignored. `status` is forced to `created` (customers cannot self-dispatch). The Order lands in the company resolved from the API credential. url: "{{base_url}}/{{namespace}}/customers/orders" method: POST headers: @@ -11,17 +11,11 @@ body: type: json content: |- { - "item": "Wireless Headphones", - "weight": 2.5, - "weight_unit": "lb", - "value": 150, - "currency": "USD", - "category": "Electronics", - "mode": "Ocean", - "delivery": true, + "type": "transport", "scheduled_at": "2026-05-25T10:00:00Z", + "notes": "Handle with care.", "pickup": { - "name": "Ultra Warehouse", + "name": "Pickup", "street1": "4169 N State RD 7", "city": "Lauderdale Lakes", "province": "FL", @@ -29,11 +23,20 @@ body: "country": "US" }, "dropoff": { - "name": "Customer Address", + "name": "Dropoff", "city": "Kingston", "country": "JM" }, - "notes": "Handle with care." + "entities": [ + { + "name": "Wireless Headphones", + "description": "Electronics", + "weight": 2.5, + "weight_unit": "lb", + "declared_value": 150, + "currency": "USD" + } + ] } scripts: - type: afterResponse diff --git a/postman/collections/Fleetbase API/Customers/Create a Customer.params.yaml b/postman/collections/Fleetbase API/Customers/Create a Customer.params.yaml index 5b09605..9090ddc 100644 --- a/postman/collections/Fleetbase API/Customers/Create a Customer.params.yaml +++ b/postman/collections/Fleetbase API/Customers/Create a Customer.params.yaml @@ -32,7 +32,12 @@ fields: type: string required: false description: Either a `file_…` public id or a base64-encoded data URI. + - name: place + type: string|object + required: false + description: |- + Optional default Place for the customer. Either the public_id of an existing Place in this company (`place_…`), or an inline Place object using the standard Place fields: `name`, `street1`, `street2`, `city`, `province`, `postal_code`, `neighborhood`, `district`, `building`, `country`, `phone`, `meta`. When supplied, the controller creates the Place with the new customer as `owner_uuid` and sets it as `place_uuid` on the contact. - name: meta type: object required: false - description: Free-form metadata. `meta.origin` is auto-set to `fleetops_customer_portal`. + description: Free-form metadata stored on the contact's `meta` column. diff --git a/postman/collections/Fleetbase API/Customers/Create a Customer.request.yaml b/postman/collections/Fleetbase API/Customers/Create a Customer.request.yaml index 7a20400..84d4691 100644 --- a/postman/collections/Fleetbase API/Customers/Create a Customer.request.yaml +++ b/postman/collections/Fleetbase API/Customers/Create a Customer.request.yaml @@ -12,7 +12,15 @@ body: "code": "{{verification_code}}", "name": "Jane Customer", "password": "{{customer_password}}", - "phone": "{{$randomPhoneNumber}}" + "phone": "{{$randomPhoneNumber}}", + "place": { + "name": "Home", + "street1": "123 Main Street", + "city": "Kingston", + "province": "Kingston", + "postal_code": "00000", + "country": "JM" + } } scripts: - type: afterResponse From 33648e7cb3da6d1876282f40e6799cd2d34bcf79 Mon Sep 17 00:00:00 2001 From: "Ronald A. Richardson" Date: Thu, 21 May 2026 18:51:42 +0800 Subject: [PATCH 4/5] Add Order Configs collection + company sub-object on Customer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .../Customers/.resources/object.yaml | 15 ++++- .../Order Configs/.resources/definition.yaml | 4 ++ .../Order Configs/.resources/object.yaml | 66 +++++++++++++++++++ .../Query Order Configs.queryParams.yaml | 18 +++++ .../Query Order Configs.request.yaml | 9 +++ .../Retrieve an Order Config.request.yaml | 21 ++++++ 6 files changed, 130 insertions(+), 3 deletions(-) create mode 100644 postman/collections/Fleetbase API/Order Configs/.resources/definition.yaml create mode 100644 postman/collections/Fleetbase API/Order Configs/.resources/object.yaml create mode 100644 postman/collections/Fleetbase API/Order Configs/Query Order Configs.queryParams.yaml create mode 100644 postman/collections/Fleetbase API/Order Configs/Query Order Configs.request.yaml create mode 100644 postman/collections/Fleetbase API/Order Configs/Retrieve an Order Config.request.yaml diff --git a/postman/collections/Fleetbase API/Customers/.resources/object.yaml b/postman/collections/Fleetbase API/Customers/.resources/object.yaml index 1ff0787..033d9e4 100644 --- a/postman/collections/Fleetbase API/Customers/.resources/object.yaml +++ b/postman/collections/Fleetbase API/Customers/.resources/object.yaml @@ -15,9 +15,14 @@ example: | "addresses": [], "token": "1|f4Wd3jY9aB...", "orders_count": 0, - "meta": { - "origin": "fleetops_customer_portal" + "company": { + "id": "company_6zV1KqN9pR", + "name": "ACME Logistics", + "currency": "USD", + "country": "US", + "phone": "+1-555-0100" }, + "meta": {}, "slug": "jane-customer", "created_at": "2026-05-21T10:00:00.000000Z", "updated_at": "2026-05-21T10:00:00.000000Z" @@ -56,9 +61,13 @@ fields: - name: orders_count type: integer description: Number of non-deleted orders linked to this customer. + - name: company + type: object + description: |- + Public-safe projection of the customer's company. Contains the company's public id, name, resolved transaction currency (with fallback through `companies.currency` → ledger `base_currency` → `"USD"`), country, and phone. Useful for portals that need to render currency labels and contact info without making a separate request. - name: meta type: object - description: Free-form metadata. Customer-portal-created accounts ship `meta.origin = "fleetops_customer_portal"` for distinguishability from operator-created contacts. + description: Free-form metadata stored on the contact's `meta` column. The API does not write to this field — it is client-owned. - name: slug type: string description: URL-friendly slug. diff --git a/postman/collections/Fleetbase API/Order Configs/.resources/definition.yaml b/postman/collections/Fleetbase API/Order Configs/.resources/definition.yaml new file mode 100644 index 0000000..0ffd23d --- /dev/null +++ b/postman/collections/Fleetbase API/Order Configs/.resources/definition.yaml @@ -0,0 +1,4 @@ +$kind: collection +description: |- + An Order Config defines the activity flow that orders progress through (created → dispatched → enroute → completed, etc.). Each company has at least the system default `transport` config; bespoke configs can be defined for other operating models. Use these read-only endpoints to discover the configs available to the API credential's company and to drive UI such as status filters, activity labels, and progress timelines. +order: 8500 diff --git a/postman/collections/Fleetbase API/Order Configs/.resources/object.yaml b/postman/collections/Fleetbase API/Order Configs/.resources/object.yaml new file mode 100644 index 0000000..82e32e1 --- /dev/null +++ b/postman/collections/Fleetbase API/Order Configs/.resources/object.yaml @@ -0,0 +1,66 @@ +$kind: object +name: OrderConfig +description: |- + Read-only projection of an OrderConfig. Exposes the activity `flow` and config metadata so consumers can drive status filter chips, activity labels, and progress UI without learning the internal config schema. Internal-only fields (entities JSON, version, raw flow logic) are filtered out. +example: | + { + "id": "ordercfg_A1b2C3d4E5", + "key": "transport", + "name": "Transport", + "namespace": "system:order-config:transport", + "description": "Default Fleet-Ops transport flow.", + "tags": [], + "status": "active", + "version": 1, + "flow": [ + { "code": "created", "status": "Order Created", "details": "", "color": "#6028b8", "complete": false, "pod_method": null, "require_pod": false }, + { "code": "dispatched", "status": "Order Dispatched", "details": "", "color": "#2563eb", "complete": false, "pod_method": null, "require_pod": false }, + { "code": "started", "status": "Order Started", "details": "", "color": "#2563eb", "complete": false, "pod_method": null, "require_pod": false }, + { "code": "enroute", "status": "Driver Enroute", "details": "", "color": "#2563eb", "complete": false, "pod_method": null, "require_pod": false }, + { "code": "completed", "status": "Order Completed", "details": "", "color": "#16a34a", "complete": true, "pod_method": null, "require_pod": false } + ], + "created_at": "2026-04-01T10:00:00.000000Z", + "updated_at": "2026-04-01T10:00:00.000000Z" + } +fields: + - name: id + type: string + description: Public order-config identifier. Prefixed `ordercfg_`. + - name: key + type: string + description: Short identifier (e.g. `transport`). Stable across companies for system configs. + - name: name + type: string + description: Human-readable name. + - name: namespace + type: string + description: Fully-qualified identifier (e.g. `system:order-config:transport`). Unique per company. + - name: description + type: string + description: Free-form description. + - name: tags + type: array of strings + description: Free-form tags. + - name: status + type: string + description: Config lifecycle status (e.g. `active`). + - name: version + type: integer + description: Schema version. + - name: flow + type: array of objects + description: |- + Ordered list of activities in the config's status flow. Each activity carries: + - `code` (string) — machine identifier (e.g. `created`, `dispatched`) + - `status` (string) — human-readable label + - `details` (string) — long-form description + - `color` (string) — hex colour hint for status UI + - `complete` (boolean) — true for terminal activities + - `pod_method` (string|null) — proof-of-delivery method, when set + - `require_pod` (boolean) — whether proof-of-delivery is required at this step + - name: created_at + type: timestamp + description: When the config was created. + - name: updated_at + type: timestamp + description: When the config was last updated. diff --git a/postman/collections/Fleetbase API/Order Configs/Query Order Configs.queryParams.yaml b/postman/collections/Fleetbase API/Order Configs/Query Order Configs.queryParams.yaml new file mode 100644 index 0000000..cd801f7 --- /dev/null +++ b/postman/collections/Fleetbase API/Order Configs/Query Order Configs.queryParams.yaml @@ -0,0 +1,18 @@ +$kind: params +fields: + - name: limit + type: integer + required: false + description: Page size. + - name: offset + type: integer + required: false + description: Page offset. + - name: key + type: string + required: false + description: Filter by short key (e.g. `transport`). + - name: query + type: string + required: false + description: Free-text search across config fields. diff --git a/postman/collections/Fleetbase API/Order Configs/Query Order Configs.request.yaml b/postman/collections/Fleetbase API/Order Configs/Query Order Configs.request.yaml new file mode 100644 index 0000000..4b8952f --- /dev/null +++ b/postman/collections/Fleetbase API/Order Configs/Query Order Configs.request.yaml @@ -0,0 +1,9 @@ +$kind: http-request +name: "Query Order Configs" +description: "Lists OrderConfigs available to the company resolved from the API credential." +url: "{{base_url}}/{{namespace}}/order-configs" +method: GET +headers: + Accept: application/json + +order: 1000 diff --git a/postman/collections/Fleetbase API/Order Configs/Retrieve an Order Config.request.yaml b/postman/collections/Fleetbase API/Order Configs/Retrieve an Order Config.request.yaml new file mode 100644 index 0000000..61ef45d --- /dev/null +++ b/postman/collections/Fleetbase API/Order Configs/Retrieve an Order Config.request.yaml @@ -0,0 +1,21 @@ +$kind: http-request +name: "Retrieve an Order Config" +description: |- + Fetches a single OrderConfig. The `{id}` segment accepts any identifier supported by `OrderConfig::resolveFromIdentifier` — `uuid`, `public_id`, `namespace`, or short `key`. Use `transport` to retrieve the system default flow. +url: "{{base_url}}/{{namespace}}/order-configs/{{order_config_id}}" +method: GET +headers: + Accept: application/json +scripts: + - type: afterResponse + code: |- + var json_response = pm.response.json(); + let cv = pm.environment; + + if (json_response && json_response.id) { + cv.set("order_config_id", json_response.id); + cv.set("order_config_key", json_response.key); + } + language: text/javascript + +order: 2000 From 0036bc2ce2150644dd8e64d05acf81c68164e89c Mon Sep 17 00:00:00 2001 From: "Ronald A. Richardson" Date: Thu, 21 May 2026 19:33:58 +0800 Subject: [PATCH 5/5] Customers/Create a Customer Order: document service_quote field 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) --- .../Customers/Create a Customer Order.params.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/postman/collections/Fleetbase API/Customers/Create a Customer Order.params.yaml b/postman/collections/Fleetbase API/Customers/Create a Customer Order.params.yaml index 6893e45..b7f00fe 100644 --- a/postman/collections/Fleetbase API/Customers/Create a Customer Order.params.yaml +++ b/postman/collections/Fleetbase API/Customers/Create a Customer Order.params.yaml @@ -24,6 +24,11 @@ fields: type: object required: false description: Free-form metadata stored on the order's `meta` column. + - name: service_quote + type: string + required: false + description: |- + Optional ServiceQuote reference (uuid or `sqte_…` public_id) returned by `GET /v1/service-quotes`. When supplied, the controller resolves the quote via `ServiceQuote::resolveFromRequest` and consumes it via `$order->purchaseServiceQuote()` to lock the pricing onto the order's PurchaseRate (same behavior as `OrderController::create`). - name: payload type: string|object required: false