From af0cb02021552a2f1b7f3af1f82607fa8e17d48c Mon Sep 17 00:00:00 2001 From: "Ronald A. Richardson" Date: Tue, 11 Aug 2026 18:55:54 +0800 Subject: [PATCH] fix(fleetops): repair three broken variable chains MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Retrieve an Order Config set {{order_config_id}} in its OWN afterResponse. That cannot work — the value has to exist before the request is sent, so the URL went out as /order-configs/%7B%7Border_config_id%7D%7D and answered "Order config not found." Query Order Configs runs first and is the natural source, so it captures the id now. Render Label addressed {{label_subject_id}}, which nothing set. It answered "Unable to render label." for the literal placeholder. The request already pins type=order, so it renders {{order_id}} — a label for the order the collection just created. Update a Contact tried to change a customer contact's type. Create a Contact makes one with "type": "customer", and the update sent "type": "technician". The API refuses that deliberately — "Customer contact type cannot be changed." — because the contact is linked to a customer record. The example was documenting an operation the API does not allow. `type` is dropped rather than the create being changed: updating a contact's name, title, email and phone is the real use case, and a customer contact whose type is immutable is the behaviour worth showing. Co-Authored-By: Claude Opus 5 --- .../Contacts/Update a Contact.request.yaml | 1 - .../Fleetbase API/Labels/Render Label.request.yaml | 3 ++- .../Order Configs/Query Order Configs.request.yaml | 12 ++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/postman/collections/Fleetbase API/Contacts/Update a Contact.request.yaml b/postman/collections/Fleetbase API/Contacts/Update a Contact.request.yaml index a33c7f6..50cfde8 100644 --- a/postman/collections/Fleetbase API/Contacts/Update a Contact.request.yaml +++ b/postman/collections/Fleetbase API/Contacts/Update a Contact.request.yaml @@ -17,7 +17,6 @@ body: "title": "Mr", "email": "john@exampleco.com", "phone": "563-920-4264", - "type": "technician", "meta": { "external_ref": "john-doe" } diff --git a/postman/collections/Fleetbase API/Labels/Render Label.request.yaml b/postman/collections/Fleetbase API/Labels/Render Label.request.yaml index afab145..1c21c8c 100644 --- a/postman/collections/Fleetbase API/Labels/Render Label.request.yaml +++ b/postman/collections/Fleetbase API/Labels/Render Label.request.yaml @@ -5,7 +5,8 @@ method: GET pathVariables: - key: id - value: "{{label_subject_id}}" + value: "{{order_id}}" + description: The order, waypoint or entity to render a label for, matching `type` below. queryParams: format: "stream" 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 index 4b8952f..debfd40 100644 --- a/postman/collections/Fleetbase API/Order Configs/Query Order Configs.request.yaml +++ b/postman/collections/Fleetbase API/Order Configs/Query Order Configs.request.yaml @@ -5,5 +5,17 @@ url: "{{base_url}}/{{namespace}}/order-configs" method: GET headers: Accept: application/json +scripts: + - type: afterResponse + code: |- + // Retrieve an Order Config addresses {{order_config_id}}. It used to set that + // itself in its own afterResponse, which cannot work — the value has to exist + // before the request is sent. This listing runs first, so it is the natural source. + var json_response = pm.response.json(); + + if (Array.isArray(json_response) && json_response.length) { + pm.environment.set("order_config_id", json_response[0].id); + } + language: text/javascript order: 1000